From 093ec2a52697afdda610dde1302a59183719ac0f Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Tue, 8 Mar 2022 17:34:37 +0100 Subject: correct the Private Browsing mode notice on settings page --- html/settings.js | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'html/settings.js') 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; } -- cgit v1.2.3