parent
7d8507743d
commit
4946aad684
|
@ -1031,6 +1031,18 @@
|
|||
"message": "Stylus can access file:// URLs only if you enable the corresponding checkbox for Stylus extension on chrome://extensions page.",
|
||||
"description": "Note in the toolbar popup for file:// URLs"
|
||||
},
|
||||
"unreachableAMO": {
|
||||
"message": "Firefox forbids access to the site.",
|
||||
"description": "Note in the popup displayed when opened on addons.mozilla.org"
|
||||
},
|
||||
"unreachableAMOHint": {
|
||||
"message": "To allow access open <about:config>, right-click the list, click 'New', then 'Boolean', paste <privacy.resistFingerprinting.block_mozAddonManager> and click OK, <true>, OK, reload the <addons.mozilla.org> page.",
|
||||
"description": "Note in the popup when opened on addons.mozilla.org in Firefox >= 59"
|
||||
},
|
||||
"unreachableAMOHintOldFF": {
|
||||
"message": "Only Firefox 59 and newer can be configured to allow WebExtensions to add style elements on CSP-protected sites such as this one.",
|
||||
"description": "Note in the popup when opened on addons.mozilla.org in Firefox < 59"
|
||||
},
|
||||
"updateCheckFailBadResponseCode": {
|
||||
"message": "Update failed: server responded with code $code$.",
|
||||
"description": "Text that displays when an update check failed because the response code indicates an error",
|
||||
|
|
|
@ -45,7 +45,7 @@ const URLS = {
|
|||
chromeProtectsNTP: CHROME >= 3161,
|
||||
|
||||
supported: url => (
|
||||
url.startsWith('http') && !url.startsWith(URLS.browserWebStore) ||
|
||||
url.startsWith('http') && (FIREFOX || !url.startsWith(URLS.browserWebStore)) ||
|
||||
url.startsWith('ftp') ||
|
||||
url.startsWith('file') ||
|
||||
url.startsWith(URLS.ownOrigin) ||
|
||||
|
|
|
@ -122,17 +122,24 @@ function initPopup(url) {
|
|||
ignoreChromeError();
|
||||
// FF and some Chrome forks (e.g. CentBrowser) implement tab-on-demand
|
||||
// so we'll wait a bit to handle popup being invoked right after switching
|
||||
if (
|
||||
retryCountdown > 0 && (
|
||||
if (retryCountdown > 0 && (
|
||||
tab.status !== 'complete' ||
|
||||
FIREFOX && tab.url === 'about:blank'
|
||||
)
|
||||
) {
|
||||
FIREFOX && tab.url === 'about:blank')) {
|
||||
setTimeout(ping, 100, tab, --retryCountdown);
|
||||
} else {
|
||||
document.body.classList.add('unreachable');
|
||||
document.body.insertBefore(template.unreachableInfo, document.body.firstChild);
|
||||
return;
|
||||
}
|
||||
const info = template.unreachableInfo;
|
||||
if (FIREFOX && tabURL.startsWith(URLS.browserWebStore)) {
|
||||
$('label', info).textContent = t('unreachableAMO');
|
||||
$('p', info).insertAdjacentElement('afterend',
|
||||
$create('p',
|
||||
t(FIREFOX < 59 ? 'unreachableAMOHintOldFF' : 'unreachableAMOHint')
|
||||
.split(/(<.*?>)/)
|
||||
.map(s => s[0] === '<' ? $create('b', s.slice(1, -1)) : s)));
|
||||
$('p', info).remove();
|
||||
}
|
||||
document.body.classList.add('unreachable');
|
||||
document.body.insertBefore(info, document.body.firstChild);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user