ElkArte Community

General => Chit Chat => Topic started by: meetdilip on May 30, 2016, 10:07:07 am

Title: Block anti adblockers
Post by: meetdilip on May 30, 2016, 10:07:07 am
Is there any way to deal with annoying anti adblockers. From what I see the one for Xenforo uses two classes namely XenOverlay and errorOverlay to add annoying notice. Would there be any addon for Firefox to block these classes from getting loaded ?
Title: Re: Block anti adblockers
Post by: emanuele on May 30, 2016, 10:09:26 am
I guess some custom CSS would do, but that is Antechinus's field.
Title: Re: Block anti adblockers
Post by: Antechinus on May 30, 2016, 05:52:47 pm
Ah, funny you should mention that. I have been using such tricks for that purpose on some annoying sites. ;)

You need a userContent.css file, which you will probably have to create yourself if you haven't tried this stuff before. The file doesn't exist by default. I'm using Pale Moon, but it uses the same syntax as Firefox. The file's address on my box is:

C:\Users\Peter\AppData\Roaming\Moonchild Productions\Pale Moon\Profiles\rlc6h7ol.default\chrome

I've just looked in my Firefox folders (haven't used FF for ages) and there is no chrome folder inside the default profile folder. Looks like you have to create the chrome folder yourself too, since according to FF docs that's where it should be.

C:\Users\Peter\AppData\Roaming\Mozilla\Firefox\Profiles\rlc6h7ol.default

Anyway, once you've made yourself a blank file and saved it as userContent.css you can add any tricks you like to it. If you are imposing styles that aren't actually overriding CSS specified on the site, you don't need to use !important on the declaration. If you need to override CSS specified on the site, you will need to use !important.

If you wanted to hide those two classes you mentioned, something like this should do it:

Code: [Select]
@-moz-document domain(domain_name_goes_here.com) {
    .XenOverlay, .errorOverlay {
        display: none !important;
    }
}
I've also used negative z-index and several other tricks when playing around. Use whatever you think works best.