aboutsummaryrefslogtreecommitdiff
path: root/options.js
diff options
context:
space:
mode:
authorRadu <radu@pml4t.net>2023-08-26 22:16:49 -0400
committerRadu <radu@pml4t.net>2023-08-27 16:45:40 -0400
commitd98ab397c9b17036569b7a6e277b2790b02d1093 (patch)
tree708737cb50ac9354ccc4a069d95078774bb1c181 /options.js
parent76debe0071fef6865bd0fb79199f53932bf063c0 (diff)
Allow restricting websites on which extension runs
Diffstat (limited to 'options.js')
-rw-r--r--options.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/options.js b/options.js
new file mode 100644
index 0000000..3262181
--- /dev/null
+++ b/options.js
@@ -0,0 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+"use strict";
+
+(async () => {
+ const input = document.getElementById("enable-reg-exp");
+ input.value = await getSetting("enableRegExp");
+ const saveButton = document.getElementById("enable-reg-exp-save");
+ saveButton.addEventListener("click", () =>
+ setSetting("enableRegExp", input.value)
+ );
+})();