From 2d7668f2549acdef64ac5c70f48897e5b451a125 Mon Sep 17 00:00:00 2001 From: eight04 Date: Thu, 16 Dec 2021 00:38:35 +0800 Subject: [PATCH] WIP --- .gitignore | 1 + background/usercss-install-helper.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b05c94c7..08e05622 100644 --- a/.gitignore +++ b/.gitignore @@ -4,5 +4,6 @@ pull_locales_login.rb node_modules/ yarn.lock *.zip +*.log .eslintcache .transifexrc diff --git a/background/usercss-install-helper.js b/background/usercss-install-helper.js index a51af3a5..42a9ea1f 100644 --- a/background/usercss-install-helper.js +++ b/background/usercss-install-helper.js @@ -86,7 +86,7 @@ bgReady.all.then(() => { const inTab = url.startsWith('file:') && !chrome.app; const code = await (inTab ? loadFromFile : loadFromUrl)(tabId, url); if (!/^\s* { const u = new URL(url); const m = maybeDistro[u.hostname]; if (!m || m.rx.test(u.pathname)) { - openInstallerPage(tabId, url, {}); + openInstallerPage(tabId, url, {}).catch(console.error); // Silently suppress navigation. // Don't redirect to the install URL as it'll flash the text! return {redirectUrl: 'javascript:void 0'}; // eslint-disable-line no-script-url