11/25/2023 0 Comments Javascript ad blockerThere will always be a smart CSS selector that will -just- select your element. There is no real way of going around this. However, while AdBlock might not be able to block your ad from loading, it might still be able to hide it. It would be possible to rewrite such an url on the server to point to your ad. A rule would either match no ads, or too many resources. As far as I am aware, a rule in AdBlock cannot contain a regex. , where the image name will be random every time and without a common prefix). You could disguise your request in a way that it will never be 'matchable' (e.g. So what exactly could you do to be 'smarter' than AdBlock? AdBlock can hide specific elements in the DOM.Īlthough it is said that AdBlock can also modify CSS, I can't find any documentation on that other than hiding and collapsing elements.AdBlock can block resources from loading.If you want to ads to be showing, even when AdBlock is active, you'll have to understand what AdBlock is capable to do. P.S for developers: For some reason I couldn't get ABP to block these files on local environment. You can use the rules on this file to find a file name to use. For example this one which is the default one: It has bunch of lists called subscriptions which are used for blocking. in it.Īdblock plus has changed the way it finds the list and blocks the ads. One of those patterns is this (in patterns.ini): adblock is installed and enabled on this site :-DĪdblock Plus blocks certain requests or hides certain elements based on patterns it already has. You don't need to have a plugin to detect adblock, simply use this: I have a great idea that has never been tried and ad blockers cannot block this once I get done with it.Īny suggestions and Examples will be greatly appreciated. Yes I know there are other methods of getting around this with NoScript addons but I already have a solution for that. The reason behind doing it this way no ad blocker can white list the JavaScript file on your server. line of code that detects if using ad blocker What I'm looking for is a JavaScript that loads directly into the HTML that would detect if someone is using ad blocker without the use of a file. The problem with using a JavaScript file, users can white list that JavaScript file and it will no longer detect it. Most of the adblock plus detect scripts they use a file, example "show_ads.js" that is hosted on there own domain with a line it in to set it "adblock = false " What I want to do is detect Adblock plus without using a JavaScript file or jQuery. What I'm trying to do is detect Adblock plus and display a simple message for now. After searching Google and Stackoverflow for a few hours I could not find a solution.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |