mirror of https://github.com/gorhill/uBlock.git
Add `asap` behavior to `remove-attr` scriptlet
Related issue: - https://github.com/uBlockOrigin/uAssets/issues/9528
This commit is contained in:
parent
5a7600925b
commit
35d7406214
|
@ -731,7 +731,7 @@
|
|||
}
|
||||
}
|
||||
if ( skip ) { return; }
|
||||
timer = self.requestIdleCallback(rmattr, { timeout: 67 });
|
||||
timer = self.requestIdleCallback(rmattr, { timeout: 17 });
|
||||
};
|
||||
const start = ( ) => {
|
||||
rmattr();
|
||||
|
@ -746,10 +746,10 @@
|
|||
};
|
||||
if ( document.readyState !== 'complete' && /\bcomplete\b/.test(behavior) ) {
|
||||
self.addEventListener('load', start, { once: true });
|
||||
} else if ( document.readyState === 'loading' ) {
|
||||
self.addEventListener('DOMContentLoaded', start, { once: true });
|
||||
} else {
|
||||
} else if ( document.readyState !== 'loading' || /\basap\b/.test(behavior) ) {
|
||||
start();
|
||||
} else {
|
||||
self.addEventListener('DOMContentLoaded', start, { once: true });
|
||||
}
|
||||
})();
|
||||
|
||||
|
@ -1511,7 +1511,6 @@
|
|||
|
||||
|
||||
|
||||
|
||||
// These lines below are skipped by the resource parser.
|
||||
// <<<< end of private namespace
|
||||
})();
|
||||
|
|
Loading…
Reference in New Issue