code cosmetics; old typo fixup
This commit is contained in:
parent
2bb00d2559
commit
2c22d98421
|
@ -10,8 +10,7 @@
|
||||||
|
|
||||||
chrome.runtime.onMessage.addListener(onMessage);
|
chrome.runtime.onMessage.addListener(onMessage);
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', function _() {
|
onDOMready().then(() => {
|
||||||
document.removeEventListener('DOMContentLoaded', _);
|
|
||||||
window.postMessage({
|
window.postMessage({
|
||||||
direction: 'from-content-script',
|
direction: 'from-content-script',
|
||||||
message: 'StylishInstalled',
|
message: 'StylishInstalled',
|
||||||
|
@ -42,7 +41,6 @@
|
||||||
sendEvent(sendEvent.lastEvent);
|
sendEvent(sendEvent.lastEvent);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -324,9 +322,8 @@
|
||||||
// In Chrome content script is orphaned on an extension update/reload
|
// In Chrome content script is orphaned on an extension update/reload
|
||||||
// so we need to detach event listeners
|
// so we need to detach event listeners
|
||||||
window.removeEventListener(chrome.runtime.id + '-install', orphanCheck, true);
|
window.removeEventListener(chrome.runtime.id + '-install', orphanCheck, true);
|
||||||
['Update', 'Install'].forEach(type =>
|
document.removeEventListener('stylishInstallChrome', onClick);
|
||||||
['', 'Chrome', 'Opera'].forEach(browser =>
|
document.removeEventListener('stylishUpdateChrome', onClick);
|
||||||
document.addEventListener('stylish' + type + browser, onClick)));
|
|
||||||
try {
|
try {
|
||||||
chrome.runtime.onMessage.removeListener(onMessage);
|
chrome.runtime.onMessage.removeListener(onMessage);
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user