aboutsummaryrefslogtreecommitdiff
path: root/html/preferences_panel
diff options
context:
space:
mode:
Diffstat (limited to 'html/preferences_panel')
-rw-r--r--html/preferences_panel/pref.js3
-rw-r--r--html/preferences_panel/preferences_panel.html4
2 files changed, 5 insertions, 2 deletions
diff --git a/html/preferences_panel/pref.js b/html/preferences_panel/pref.js
index 9cecbb6..debb468 100644
--- a/html/preferences_panel/pref.js
+++ b/html/preferences_panel/pref.js
@@ -40,6 +40,9 @@
error = "Only one single trailing path wildcard (/*) allowed";
}
} catch (e) {
+ if (/^https?:\/\/\*\./.test(url)) {
+ return this.malformedUrl(url.replace("*.", ""));
+ }
error = "Invalid URL";
if (url && !url.includes("://")) error += ": missing protocol, either http:// or https://";
else if (url.endsWith("://")) error += ": missing domain name";
diff --git a/html/preferences_panel/preferences_panel.html b/html/preferences_panel/preferences_panel.html
index 3a0ad7a..081ae07 100644
--- a/html/preferences_panel/preferences_panel.html
+++ b/html/preferences_panel/preferences_panel.html
@@ -45,10 +45,10 @@
<h3>Settings</h3>
</div>
<div id="widgets">
- <fieldset id="section-lists"><legend>Allow or block scripts matching the following URLs ("*" matches any path)</legend>
+ <fieldset id="section-lists"><legend>Allow or block scripts matching the following URLs ("*."" matches any subdomain, "/*" matches any path)</legend>
<label>Type a new whitelist / blacklist entry:</label>
<div id="new-site">
- <input type="text" id="site" value="" placeholder="https://www.gnu.org/*">
+ <input type="text" id="site" value="" placeholder="https://*.gnu.org/*">
<button id="cmd-whitelist-site" class="white" title="Whitelist this site" default>Whitelist</button>
<button id="cmd-blacklist-site" class="red" title="Blacklist this site">Blacklist</button>
</div>