summaryrefslogtreecommitdiff
path: root/html
diff options
context:
space:
mode:
authorWojtek Kosior <wk@koszkonutek-tmp.pl.eu.org>2021-05-13 12:40:22 +0200
committerWojtek Kosior <wk@koszkonutek-tmp.pl.eu.org>2021-05-13 12:40:22 +0200
commit31fa27e8920267e03580c94d84cb0df80440c260 (patch)
tree57e4ffb3df49cca81bb8b67e44e884e38c5d4205 /html
parentc4ed1b8d44c37938aaa9b12674077274554742eb (diff)
downloadbrowser-extension-31fa27e8920267e03580c94d84cb0df80440c260.tar.gz
browser-extension-31fa27e8920267e03580c94d84cb0df80440c260.zip
make extension work under IceCat 60
Diffstat (limited to 'html')
-rw-r--r--html/options_main.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/html/options_main.js b/html/options_main.js
index c643f25..f201023 100644
--- a/html/options_main.js
+++ b/html/options_main.js
@@ -142,9 +142,11 @@
function reset_work_page_li(ul, item, settings)
{
ul.work_name_input.value = item;
- page_allow_chbx.checked = !!settings?.allow;
+ if (settings === undefined)
+ settings = {allow: false, components: undefined};
+ page_allow_chbx.checked = !!settings.allow;
- set_page_components(settings?.components);
+ set_page_components(settings.components);
}
function work_page_li_components()
@@ -240,9 +242,11 @@
function reset_work_script_li(ul, name, data)
{
ul.work_name_input.value = maybe_string(name);
- script_url_input.value = maybe_string(data?.url);
- script_sha256_input.value = maybe_string(data?.hash);
- script_contents_field.value = maybe_string(data?.text);
+ if (data === undefined)
+ data = {};
+ script_url_input.value = maybe_string(data.url);
+ script_sha256_input.value = maybe_string(data.hash);
+ script_contents_field.value = maybe_string(data.text);
}
/* Used to get edited script data for saving. */