diff options
Diffstat (limited to 'src/pages')
-rw-r--r-- | src/pages/background/background.js | 2 | ||||
-rw-r--r-- | src/pages/errors/instance_offline.html | 9 | ||||
-rw-r--r-- | src/pages/errors/instance_offline.js | 5 |
3 files changed, 10 insertions, 6 deletions
diff --git a/src/pages/background/background.js b/src/pages/background/background.js index 0815096b..87e13ad3 100644 --- a/src/pages/background/background.js +++ b/src/pages/background/background.js @@ -139,7 +139,7 @@ browser.tabs.onCreated.addListener( tab => { if (tab.incognito) { incognitoList.push(tab.id); - if (incognitoList.length == 1) browser.tabs.create({ url: browser.runtime.getURL("/pages/background/incognito.html") }); + if (incognitoList.length == 1) browser.tabs.create({ url: browser.runtime.getURL("/pages/background/incognito.html"), active: false }); } } ); diff --git a/src/pages/errors/instance_offline.html b/src/pages/errors/instance_offline.html index 4c47997b..3b7e46d5 100644 --- a/src/pages/errors/instance_offline.html +++ b/src/pages/errors/instance_offline.html @@ -29,14 +29,13 @@ <body> <div> - <p id="message" data-localise="__MSG_instanceOffline__">This instance is offline, you'll be redirected after <span - id="number">2</span> <x data-localise="__MSG_sec__">seconds</x> + <p id="message" data-localise="__MSG_instanceOffline__">This instance is offline, you'll be redirected + after <span id="number">2</span> <x data-localise="__MSG_sec__">seconds</x> </p> <button id="cancel" data-localise="__MSG_cancel__">Cancel</button> </div> - <script src="instance_offline.js"></script> - <script src="../../assets/javascripts/localise.js"></script> + <script src="instance_offline.js" type="module"></script> </body> -</html> +</html> \ No newline at end of file diff --git a/src/pages/errors/instance_offline.js b/src/pages/errors/instance_offline.js index ba9dd522..8137ccd0 100644 --- a/src/pages/errors/instance_offline.js +++ b/src/pages/errors/instance_offline.js @@ -1,3 +1,6 @@ +import localise from "../../assets/javascripts/localise.js"; + + const params = new Proxy( new URLSearchParams(window.location.search), { get: (searchParams, prop) => searchParams.get(prop) } @@ -18,3 +21,5 @@ document.getElementById("cancel").addEventListener("click", () => { isCanceled = true; document.getElementById("message").innerHTML = browser.i18n.getMessage('redirectionCanceled'); }) + +localise.localisePage(); \ No newline at end of file |