WIP
This commit is contained in:
parent
f6e6a138db
commit
2d7668f254
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -4,5 +4,6 @@ pull_locales_login.rb
|
||||||
node_modules/
|
node_modules/
|
||||||
yarn.lock
|
yarn.lock
|
||||||
*.zip
|
*.zip
|
||||||
|
*.log
|
||||||
.eslintcache
|
.eslintcache
|
||||||
.transifexrc
|
.transifexrc
|
||||||
|
|
|
@ -86,7 +86,7 @@ bgReady.all.then(() => {
|
||||||
const inTab = url.startsWith('file:') && !chrome.app;
|
const inTab = url.startsWith('file:') && !chrome.app;
|
||||||
const code = await (inTab ? loadFromFile : loadFromUrl)(tabId, url);
|
const code = await (inTab ? loadFromFile : loadFromUrl)(tabId, url);
|
||||||
if (!/^\s*</.test(code) && RX_META.test(code)) {
|
if (!/^\s*</.test(code) && RX_META.test(code)) {
|
||||||
openInstallerPage(tabId, url, {code, inTab});
|
await openInstallerPage(tabId, url, {code, inTab});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ bgReady.all.then(() => {
|
||||||
const u = new URL(url);
|
const u = new URL(url);
|
||||||
const m = maybeDistro[u.hostname];
|
const m = maybeDistro[u.hostname];
|
||||||
if (!m || m.rx.test(u.pathname)) {
|
if (!m || m.rx.test(u.pathname)) {
|
||||||
openInstallerPage(tabId, url, {});
|
openInstallerPage(tabId, url, {}).catch(console.error);
|
||||||
// Silently suppress navigation.
|
// Silently suppress navigation.
|
||||||
// Don't redirect to the install URL as it'll flash the text!
|
// Don't redirect to the install URL as it'll flash the text!
|
||||||
return {redirectUrl: 'javascript:void 0'}; // eslint-disable-line no-script-url
|
return {redirectUrl: 'javascript:void 0'}; // eslint-disable-line no-script-url
|
||||||
|
|
Loading…
Reference in New Issue
Block a user