about summary refs log tree commit diff stats
path: root/src/assets/javascripts
diff options
context:
space:
mode:
authorManeraKai <manerakai@protonmail.com>2023-03-05 20:07:11 +0300
committerManeraKai <manerakai@protonmail.com>2023-03-05 20:07:11 +0300
commit10b4fd960162f6636ef6bd6969b73885ee93b20c (patch)
treeac372da0902430cf0dcc17e826ea618176f827cb /src/assets/javascripts
parentFixed bugs in the context menus (diff)
downloadlibredirect-10b4fd960162f6636ef6bd6969b73885ee93b20c.zip
Fixed reverse tab for context menu for chromium
Diffstat (limited to 'src/assets/javascripts')
-rw-r--r--src/assets/javascripts/general.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/assets/javascripts/general.js b/src/assets/javascripts/general.js
index 7adb0433..588c67d1 100644
--- a/src/assets/javascripts/general.js
+++ b/src/assets/javascripts/general.js
@@ -7,9 +7,9 @@ window.browser = window.browser || window.chrome
 let exceptions
 
 function isException(url) {
-	if (url !== undefined) {
-		for (const item of exceptions.url) if (item == url.href) return true
-		for (const item of exceptions.regex) if (new RegExp(item).test(url.href)) return true
+	if (exceptions && url) {
+		if (exceptions.url) for (const item of exceptions.url) if (item == url.href) return true
+		if (exceptions.regex) for (const item of exceptions.regex) if (new RegExp(item).test(url.href)) return true
 	}
 	return false
 }