parent
2eb0a309b5
commit
28ef5572ba
|
@ -64,6 +64,12 @@ chrome.runtime.onMessage.addListener(onRuntimeMessage);
|
|||
{hostSuffix: '.githubusercontent.com', urlSuffix: '.user.styl'},
|
||||
]
|
||||
});
|
||||
// FF misses some about:blank iframes so we inject our content script explicitly
|
||||
chrome.webNavigation.onDOMContentLoaded.addListener(webNavIframeHelperFF, {
|
||||
url: [
|
||||
{urlEquals: 'about:blank'},
|
||||
]
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -330,6 +336,20 @@ function webNavUsercssInstallerFF(data) {
|
|||
}
|
||||
|
||||
|
||||
function webNavIframeHelperFF({tabId, frameId}) {
|
||||
if (!frameId) return;
|
||||
sendMessage({method: 'ping', tabId, frameId}, pong => {
|
||||
ignoreChromeError();
|
||||
if (pong) return;
|
||||
chrome.tabs.executeScript(tabId, {
|
||||
frameId,
|
||||
file: '/content/apply.js',
|
||||
matchAboutBlank: true,
|
||||
}, ignoreChromeError);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function updateIcon({tab, styles}) {
|
||||
if (tab.id < 0) {
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue
Block a user