insertCSS#cssOrigin requires FF53
This commit is contained in:
parent
bf9ebab295
commit
9585aea08d
|
@ -754,19 +754,18 @@ function handleCssTransitionBug({tabId, frameId, url, styles}) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function patchFirefox() {
|
function patchFirefox() {
|
||||||
browser.tabs.insertCSS(tabId, {
|
const options = {
|
||||||
frameId,
|
frameId,
|
||||||
code: CSS_TRANSITION_SUPPRESSOR,
|
code: CSS_TRANSITION_SUPPRESSOR,
|
||||||
cssOrigin: 'user',
|
matchAboutBlank: true,
|
||||||
|
};
|
||||||
|
if (FIREFOX >= 53) {
|
||||||
|
options.cssOrigin = 'user';
|
||||||
|
}
|
||||||
|
browser.tabs.insertCSS(tabId, Object.assign(options, {
|
||||||
runAt: 'document_start',
|
runAt: 'document_start',
|
||||||
matchAboutBlank: true,
|
})).then(() => setTimeout(() => {
|
||||||
}).then(() => setTimeout(() => {
|
browser.tabs.removeCSS(tabId, options).catch(ignoreChromeError);
|
||||||
browser.tabs.removeCSS(tabId, {
|
|
||||||
frameId,
|
|
||||||
code: CSS_TRANSITION_SUPPRESSOR,
|
|
||||||
cssOrigin: 'user',
|
|
||||||
matchAboutBlank: true,
|
|
||||||
}).catch(ignoreChromeError);
|
|
||||||
})).catch(ignoreChromeError);
|
})).catch(ignoreChromeError);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user