diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-03-08 17:34:37 +0100 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-03-08 17:34:37 +0100 |
commit | 093ec2a52697afdda610dde1302a59183719ac0f (patch) | |
tree | 1216a20fed8a04b83bdd6ef42f6134c9bddd7a77 /html/settings.js | |
parent | 96efcc335bbd9f2ad098e694d6cff6c1c22b4ce8 (diff) | |
download | browser-extension-093ec2a52697afdda610dde1302a59183719ac0f.tar.gz browser-extension-093ec2a52697afdda610dde1302a59183719ac0f.zip |
correct the Private Browsing mode notice on settings page
Diffstat (limited to 'html/settings.js')
-rw-r--r-- | html/settings.js | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/html/settings.js b/html/settings.js index e258fcb..87c1095 100644 --- a/html/settings.js +++ b/html/settings.js @@ -134,24 +134,23 @@ function set_up_settings_view() { set_up_repos_tab(); } +async function init_settings_page() { #IF MOZILLA -async function show_indexeddb_error() { const this_tab = await browser.tabs.getCurrent(); - if (this_tab.incognito) - by_id("indexeddb_private_mode_explanation").classList.remove("hide"); -#ELSE -function show_indexeddb_error() { + + if (this_tab.incognito) { + by_id("private_mode_error").classList.remove("hide"); + by_id("loader").remove(); + return; + } #ENDIF - by_id("loader").remove(); - by_id("indexeddb_error").classList.remove("hide"); -} -async function init_settings_page() { try { await haketilodb.get(); } catch(e) { console.error("Haketilo:", e); - show_indexeddb_error(); + by_id("indexeddb_error").classList.remove("hide"); + by_id("loader").remove(); return; } |