-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add scriptlets remove-class and alert-buster-silent #935
Comments
What kind of issue ? I tested with my remove-class scriptlet, I see no change in appearance whatsoever. |
@uBlock-user Tiny issue maybe. #intro.hasad {
padding-bottom: 0px;
border-bottom: 0;
} Before: Mainly I just can tell that, on other sites, this can be a real punch. |
Some padding appears at the bottom border ? Edit: I see the border getting cut out in presence of class |
About dialogs: did you tried |
|
My own implementation to (function() {
const token = '{{1}}';
if ( token === '' || token === '{{1}}' ) { return; }
const tokens = token.split(/\s*\|\s*/);
let selector = '{{2}}';
if ( selector === '' || selector === '{{2}}' ) {
selector = `.${tokens.join(',.')}`;
}
const rmclass = function(ev) {
if ( ev ) {
window.removeEventListener(ev.type, rmclass, true);
}
try {
const nodes = document.querySelectorAll(selector);
for ( const node of nodes ) {
node.classList.remove(...tokens);
}
} catch(ex) {
}
};
if ( document.readyState === 'loading' ) {
window.addEventListener('DOMContentLoaded', rmclass, true);
} else {
rmclass();
}
})(); |
Related issue: - uBlockOrigin/uBlock-issues#935 Arguments are similar to that of remove-attr scriptlet.
Related issue: - uBlockOrigin/uBlock-issues#935 Arguments are similar to that of remove-attr scriptlet.
Prerequisites
Description
On wikiHow, there is a class called
hasad
, and when the ad is blocked, this class causes some small issues on the appearance of the page.Writing UserStyle or
:style
rules helps, but remove those class works once for all. So, I hope there is aremove-class
scriptlet to deal with whatremove-attr
can't do.alert-buster-slient
is less important. Maybe it's+js(alert-buster, slient)
, maybe there will be a scriptlet which can handlealart()
,confirm()
andprompt()
.A specific URL where the issue occurs
https://www.wikihow.com/Prevent-Coronavirus
Steps to Reproduce
N/A
Expected behavior:
hasad
can be removed by something succinct.Actual behavior:
Have to use this:
Your environment
The text was updated successfully, but these errors were encountered: