FuckAdBlock
FuckAdBlock copied to clipboard
Talk about the V4!
Hello everyone, I am currently working on the V4 FuckAdBlock. A beta is scheduled for this week. She also solve the problem of not detecting AdBlock via the DOM.
If you have ideas for other features that could be added, made me know here.
Thank you.
This is the first beta of the V4! https://github.com/sitexw/FuckAdBlock/tree/v4.x
Thank you to test, but do not use in prod! Example of options in AdBlock for local testing:
@@|http://sitexw.local/*/fuckadblock.js
@@||sitexw.local^$elemhide
when you add the following code into Adblock plus filter, fuckadblock does't detect it.. So please fixed it too.
@@||sitexw.fr^$xmlhttprequest
Thanks for your feedback.
If we do not block HTTP requests and ads in HTML, then it can be considered as detecting AdBlock is not very serious because it can display advertisements.
Moreover, I work on the V4 beta 2, which will radically change operating over Beta 1. A plugin system allows you to add detection methods for sticking up to individual needs.
Coming back to you very quickly.
You can test the new beta 2 of the V4! http://fuckadblock.sitexw.fr/beta/ https://github.com/sitexw/FuckAdBlock/tree/v4.x
Hello, Try to add the following three filters to AdblockPlus:
@@||sitexw.fr^$xmlhttprequest
@@||sitexw.fr^$elemhide
@@||sitexw.fr^$script

Yes, I know, but as I explained to you above if you enable all these exceptions, so you can display your ads, so AdBlock does not harm you.
In Beta 3, we can see the following elements:
- Adding a log system
- Implementation of the detection of compatibility (version number) between a plugin and FuckAdBlock
- Fixed a bug on the timeout (not work)
- Fixed (if possible) HTTP bug if the person is disconnected to the Internet (eg mobile)
If you have other things to cheer me up. Thank you.
Sorry for being so long but FuckAdBlock back with Beta 3, more stable and more secure than ever! The detection on iOS still does not work (#38), I could not work on it because I do not have an iPhone (even less with iOS 9). I'll check with some friends for my tests. Normally, the final version should be out within the week.
By then if you want to test and if you of returns: http://fuckadblock.sitexw.fr/beta/ https://github.com/sitexw/FuckAdBlock/tree/v4.x
I tried to configure the plugin "http" in "import" mode with the URL of my ad network, and detected the adblock successfully, But when I add the following to adblock it will not detected,
@@||ads.yoursite.com$script,domain=yoursite.com
How we can fix this?
Want to write this instead?
@@||your-site.com$script,domain=your-advertising-agency.com
This rule says that one blocks all the usual scripts (fuckadblock.js, ads.js, ...), except that of "your-advertising-agency.com". In this case, yes detecting by HTTP will not work, but the detection HTML work. You have to let them 2 to activate.
No, you have to write it like the following
@@||Ads-site.com$script,domain=my-website.com
In this case, I do not understand how this impacts the site. I tried this rule:
@@||cloudflare.com$script,domain=fuckadblock.sitexw.fr
And only blocks "fuckadblock.js" on "fuckadblock.sitexw.fr". The 2 scripts CloudFlare are not affected:
- http://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js
- http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.7/highlight.min.js
Imagining that CloudFlare is an advertising agency.
Can you tell me more precisely what this rule and how it impacts your site. Do you have an example to show me online?
Thank you.
Please try to add the following filter on Adblock Pluse
@@||eclkmpsa.com/adServe/banners?tid=ALYDL&action=r$script,domain=al.ly
Then try to visit the following link: http://al.ly/LCsk
You can not detect the adblock
@sitexw Did you get it?
For me, it works without problems: https://1.sendvid.com/idat0gxt.mp4
@sitexw I am talking about Adblock-Plus not Adblock you can find Adblock-Plus extension on this link: https://chrome.google.com/webstore/detail/adblock-plus/cfhdojbkjhnklbpkdaibdccddilifddb
It does not change anything.

You have what block list?
@sitexw you should add @@||al.ly^$script too, please try it and feedback to me...
@sitexw Looking forward to your reply,,,
I have tried it. Great work! I found a anti-fuckAdBlock https://github.com/Mechazawa/FuckFuckAdblock/ That prevent detection in version 4 too.
My settings in one js-file (testing):
# here code of fuckfuckadblock
var fuckAdBlock = undefined, FuckAdBlock = undefined;
# here code of fuckadblock (your code)
var adBlockDetected = function() {
console.log('yes');
}
fuckAdBlock.on(true, adBlockDetected);
fuckAdBlock = undefined;
result with fuckfuckadblock, no detection. remove fuckfuckadblock, its working fine. ;)
the reason is this line: Object.defineProperties(window, {fuckAdBlock : { value: fuck, enumerable: true, writable: false }});
I have modify fuckAdBlock with random variables for each script call, now that working against fuckfuckadblock. but not sure this is best practise.
Hello, sorry for the response time, but I've been busy this weekend.
I saw all your messages. There are still bugs and opportunities to stop FuckAdBlock (via FuckFuckAdBlock example). I will continue my efforts to solve these problems. I am sorry for those who look forward to the final output of the V4, but research and development take a long time!
I come to you this week or this weekend with a new more stable and scratchproof beta.
@sitexw Did you get it? if so, is there any temporary solution for this issue?
Don't say "sorry". Thanks for your work. :)
I don't think you have a chance against fuckfuckadblock, because its a userscript and its called before your script and defineProperties() you can't delete. I found no way: http://stackoverflow.com/questions/7141210/how-do-i-undo-a-object-defineproperty-call
My solution for testing porpuse was this:
# here code of fuckfuckadblock
// http://stackoverflow.com/questions/1349404/generate-a-string-of-5-random-characters-in-javascript
function makeid()
{
var text = "";
var possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
for( var i=0; i < 5; i++ )
text += possible.charAt(Math.floor(Math.random() * possible.length));
return text;
}
var antiadblock1 = makeid();
var antiadblock2 = makeid();
eval('var ' + antiadblock1 + " = undefined;");
eval('var ' + antiadblock2 + " = undefined;");
# here code of fuckadblock (your code) modified: !function(t,e,i){var n=!1,o=antiadblock2,.........}}(window,antiadblock1,antiadblock2);
var adBlockDetected = function() {
console.log('yes');
}
eval(antiadblock1).on(true, adBlockDetected);
eval(antiadblock1 + " = undefined;");
antiadblock1 = undefined;
antiadblock2 = undefined;
I create a random string each site request and use this random string as variable instead of "fuckAdBlock". I think/hope with this you can test for advertising and when you lock this plugin(variable) with defineProperties() too, you can use it all time (I think).
@mballag Yes, I have the same thing. But that is normal because you allow URL http://eclkmpsa.com/adServe/banners?tid=ALYDL&action=r but you call in your script, the URL http://eclkmpsa.com/adServe/banners?tid=MelhoshDL&action=r. You must use the same URL.
@Daijobou Anyway, thank you for your help. With regard of FuckFuckAdBlock, I already know how to maintain the same detection if enabled. But the problem is that it requires a little more code in html than before .. But I would propose two versions, one short with a partial security (does not withstand FuckFuckAdBlock, ...) and with maximum security resistant all !
@sitexw even if I use the same link, please try it again, and if there any solution for this, please help me.
@sitexw Hi there, I've been adding and playing with this project. I've noticed this doesn't detect Ghostery which is fine - I've coded the only flags you can look for when Ghostery is enabled. Feel free to add, recode if you like:
var ghostery = $('a').attr('title'); if (ghostery === 'Click to dismiss alert bubble') { console.log("GHOSTERY IS ENABLED", ghostery); } else if (ghostery === 'Click to configure alert bubble') { console.log("GHOSTERY IS ENABLED", ghostery); }
I have installed now ghostery (for testing) in firefox 43 and activate it on a site for three trackings, but there was no string "bubble" in html. Maybe you use a older version?
I'm still researching how Ghostery is injected onto the page with Firefox but with Chrome you see a purple dialog box at the bottom right of the screen containing an Anchor with that content within the title attribute. Try for Chrome?
Thank @JordyVialoux but 3 problems arises:
- At first, the translation in French is the message
Cliquez pour configurer l'info-bulle d'alerte, so it would detect all languages! - It is also possible to disable the warning (in the options), so a risk of not detecting it.
- Finally, the alert does not indicate whether Ghostery blocks or not scripts, but it simply indicates that it is installed. So if the user does not block scripts, you will still have the message.
But one can always be the available as a plugin =)
Oh man, I completely forgot about the language difference. Ghostery is a very tricky one because that was the only somewhat consistent flag I could see in the code. My purpose for the use of this tool is purely just to detect and log if a user has Ghostery installed. Do you have any ideas on how to detect Ghostery?
Unfortunately, I think not, because the only way was via the popup, but if it is disabled, any falls in the water.
Ok no problem. I'll keep researching and if I find anything more I'll be sure to post here. Thank you for this plugin @sitexw! It's fantastic :-)
Please don't use "!!". It is his free time and you have not paid for a service. Put your question politely and he answers you.
Agreed... @Melhosh Maybe try to research and resolve on your own? We all are contributing to this project - happy coding! :-)
sorry for this, I did not mean that... and thank you for support
Just a quick note, I'm testing safari v9.0.1 and AdBlocker is not being detected.
@sitexw Is there any update about my issue?
Happy new year :)
Any news about verison 4?
In Firefox 43 with ABP its not working.
The detection happens very late (not before the page is fully loaded). Is there a way we could speed up the detection and let it happen earlier? I am asking because the gap between the DOM is loaded when the page starts to render and the complete page is loaded are more than a few seconds for many websites. Unfortunately my coding skills did not allow me to optimize the script myself and make a pull request.
up! In Firefox 43 with ABP its not working correctly.
Hi guys, is there any capability to detect ad blocking for mobile?
The V4, yes.
Hi, "Adblock-Pluse" can bypass it, if you add "$elemhide", "$xmlhttprequest", "$script", on filters.
Kindly Is there any solution for this issue
Yes indeed, but if you use these tags, advertising works =)
@sitexw Really like all the work you've been putting into this, helps alot of people. I hope you release v4 soon. Perhaps add more features to it incrementally? I think plugin features are a great add too.
If I use beta3 do you think, it's production ready?
Will you be able to have a option to "re load" ads if they are being blocked?
is V4 still coming? really like your project!
Yes, and I too like this project! ^^ But the lack of time does not help me ... Moreover, I have to rewrite much of the code to protect it from attempts to rewrite the FuckAdBlock class.
You can already use the V4, and the next versions should not break compatibility.
Not looked properly, but does your code, check to see if the user has re-enabled ad-blockers after initial page loads as i am doing some dynamic ad reloading after the page is loaded!
@sitexw Accept PR #70 plz
Is it planned to develop the project?
Hey! Valentin, where is you? (((