adblock remove css rule/class without blocking it

Anything that has something to do with a computer is welcome here.
User avatar
3ICE
Admin
Posts: 2440
Joined: Sat Mar 01, 2008 11:34 pm
Realm: Europe
Account: 3ICE
Clan: 3ICE
Location: Hungary
Contact:

adblock remove css rule/class without blocking it

Unread post by 3ICE »

I'm fighting body class="modal-open" which kills scrolling by applying overflow:hidden to the whole page.

Adblock styling filters are written like so:

Code: Select all

<domain.tld> + #$# + <CSS selector> + { <CSS style> }
3ice.hu#$#a{color:red}
I found this on StackOverflow wrote:Just avoid putting a space between the selector and the opening brace. Because it can give you some trouble.
Here is an example of a CSS rule that changes Twitter background:

Code: Select all

twitter.com#$#body.logged-in{ background-color: #ffcc00 !important; }
If that's not working for you, here is another way to change an element's style:

Code: Select all

example.com##h1:style(background-color: blue !important)
Make sure not to use curly brackets.
I use uBlock Origin, and both answers work for me.

Here are two examples of the two potential style fixers I can use on the bad website:

Code: Select all

penny.hu##body:style(overflow:auto !important)
penny.hu#$#body.modal-open{ overflow:scroll !important; }
I chose to use the second one, actually.
ImageImageImageImageImage
Image
ImageImage

BugMeNot
Posts: 110
Joined: Wed Jan 21, 2009 12:46 pm

Re: adblock remove css rule/class without blocking it

Unread post by BugMeNot »

This is a guest account intended for use by people who wish to remain anonymous or hate registering.
(Please don't forget to sign your posts with your name if you want us to know who you are.)
http://www.bugmenot.com/view/3ice.hu

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest