aboutsummaryrefslogtreecommitdiff
path: root/html/options_main.js
diff options
context:
space:
mode:
Diffstat (limited to 'html/options_main.js')
-rw-r--r--html/options_main.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/html/options_main.js b/html/options_main.js
index 2eeee1b..409df80 100644
--- a/html/options_main.js
+++ b/html/options_main.js
@@ -632,7 +632,7 @@ function hide_import_window()
/*
* Reset file <input>. Without this, a second attempt to import the same
- * file would result in "change" event on happening on <input> element.
+ * file would result in "change" event not happening on <input> element.
*/
file_opener_form.reset();
}
@@ -684,9 +684,9 @@ function initialize_import_facility()
*
* We don't need to worry about the state of the page (e.g. some editing being
* in progress) in jump_to_item() - this function is called at the beginning,
- * before callbacks are assigned to buttons, so it is safe to assume lists are
- * initialized with items and page is in its virgin state with regard to
- * everything else.
+ * together with callbacks being assigned to buttons, so it is safe to assume
+ * lists are initialized with items and page is in its virgin state with regard
+ * to everything else.
*/
function jump_to_item(url_with_item)
{
@@ -717,8 +717,6 @@ async function main()
add_radio_li(prefix, item);
}
- jump_to_item(document.URL);
-
let name = TYPE_NAME[prefix];
let add_but = by_id(`add_${name}_but`);
@@ -745,6 +743,8 @@ async function main()
cancel_components_but.addEventListener("click", cancel_components);
}
+ jump_to_item(document.URL);
+
initialize_import_facility();
storage.add_change_listener(handle_change);