parent
b220b2d2f0
commit
db256f73f5
|
@ -16,7 +16,7 @@
|
||||||
chrome.runtime.onMessage.addListener(onMessage);
|
chrome.runtime.onMessage.addListener(onMessage);
|
||||||
|
|
||||||
let gotBody = false;
|
let gotBody = false;
|
||||||
new MutationObserver((mutations, observer) => {
|
new MutationObserver(function _(mutations, observer) {
|
||||||
if (!gotBody) {
|
if (!gotBody) {
|
||||||
if (!document.body) return;
|
if (!document.body) return;
|
||||||
gotBody = true;
|
gotBody = true;
|
||||||
|
@ -29,11 +29,12 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (document.getElementById('install_button')) {
|
if (document.getElementById('install_button')) {
|
||||||
observer.disconnect();
|
if (observer) observer.disconnect();
|
||||||
onDOMready().then(() => {
|
onDOMready().then(() => {
|
||||||
requestAnimationFrame(() => {
|
requestAnimationFrame(() => {
|
||||||
sendEvent(sendEvent.lastEvent);
|
sendEvent(sendEvent.lastEvent);
|
||||||
});
|
});
|
||||||
|
setTimeout(_);
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user