summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorhackademix2018-07-09 01:36:28 +0200
committerhackademix2018-07-09 01:36:28 +0200
commit103324e5d2ea5ac2ea589a44b822a997ff503be3 (patch)
tree50b6447703365acabd6069b18525480fe2978410 /src/ui
parent5217db79ce7db2a2d6e95483d3f6d9dad462a476 (diff)
downloadnoscript-103324e5d2ea5ac2ea589a44b822a997ff503be3.tar.gz
noscript-103324e5d2ea5ac2ea589a44b822a997ff503be3.tar.xz
noscript-103324e5d2ea5ac2ea589a44b822a997ff503be3.zip
More graceful handling of internal and restricted URLs.
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/popup.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ui/popup.js b/src/ui/popup.js
index 8ca4f44..059e3df 100644
--- a/src/ui/popup.js
+++ b/src/ui/popup.js
@@ -130,10 +130,14 @@ addEventListener("unload", e => {
} catch (e) {
error(e, "Could not run scripts on %s: privileged page?", tab.url);
}
- if (!isHttp) {
+
+ await include("/lib/restricted.js");
+ let isRestricted = isRestrictedURL(tab.url);
+ if (!isHttp || isRestricted) {
showMessage("warning", _("privilegedPage"));
let tempTrust = document.getElementById("temp-trust-page");
tempTrust.disabled = true;
+ return;
}
if (!UI.seen) {
if (!isHttp) return;