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; }
|
if ( skip ) { return; }
|
||||||
timer = self.requestIdleCallback(rmattr, { timeout: 67 });
|
timer = self.requestIdleCallback(rmattr, { timeout: 17 });
|
||||||
};
|
};
|
||||||
const start = ( ) => {
|
const start = ( ) => {
|
||||||
rmattr();
|
rmattr();
|
||||||
|
@ -746,10 +746,10 @@
|
||||||
};
|
};
|
||||||
if ( document.readyState !== 'complete' && /\bcomplete\b/.test(behavior) ) {
|
if ( document.readyState !== 'complete' && /\bcomplete\b/.test(behavior) ) {
|
||||||
self.addEventListener('load', start, { once: true });
|
self.addEventListener('load', start, { once: true });
|
||||||
} else if ( document.readyState === 'loading' ) {
|
} else if ( document.readyState !== 'loading' || /\basap\b/.test(behavior) ) {
|
||||||
self.addEventListener('DOMContentLoaded', start, { once: true });
|
|
||||||
} else {
|
|
||||||
start();
|
start();
|
||||||
|
} else {
|
||||||
|
self.addEventListener('DOMContentLoaded', start, { once: true });
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
@ -1511,7 +1511,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// These lines below are skipped by the resource parser.
|
// These lines below are skipped by the resource parser.
|
||||||
// <<<< end of private namespace
|
// <<<< end of private namespace
|
||||||
})();
|
})();
|
||||||
|
|
Loading…
Reference in New Issue