FuckAdBlock icon indicating copy to clipboard operation
FuckAdBlock copied to clipboard

Talk about the V4!

Open sitexw opened this issue 10 years ago • 52 comments

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.

sitexw avatar Oct 14 '15 11:10 sitexw

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

sitexw avatar Oct 14 '15 17:10 sitexw

when you add the following code into Adblock plus filter, fuckadblock does't detect it.. So please fixed it too.

@@||sitexw.fr^$xmlhttprequest

mballag avatar Oct 31 '15 13:10 mballag

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.

sitexw avatar Nov 01 '15 18:11 sitexw

You can test the new beta 2 of the V4! http://fuckadblock.sitexw.fr/beta/ https://github.com/sitexw/FuckAdBlock/tree/v4.x

sitexw avatar Nov 02 '15 19:11 sitexw

Hello, Try to add the following three filters to AdblockPlus:

@@||sitexw.fr^$xmlhttprequest
@@||sitexw.fr^$elemhide
@@||sitexw.fr^$script

adblcok

mballag avatar Nov 02 '15 19:11 mballag

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.

sitexw avatar Nov 02 '15 22:11 sitexw

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

sitexw avatar Nov 29 '15 02:11 sitexw

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?

mballag avatar Dec 10 '15 09:12 mballag

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.

sitexw avatar Dec 10 '15 09:12 sitexw

No, you have to write it like the following

@@||Ads-site.com$script,domain=my-website.com

mballag avatar Dec 10 '15 10:12 mballag

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.

sitexw avatar Dec 10 '15 10:12 sitexw

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

mballag avatar Dec 10 '15 11:12 mballag

@sitexw Did you get it?

mballag avatar Dec 10 '15 12:12 mballag

For me, it works without problems: https://1.sendvid.com/idat0gxt.mp4

sitexw avatar Dec 10 '15 12:12 sitexw

@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

mballag avatar Dec 10 '15 18:12 mballag

It does not change anything. image image

You have what block list?

sitexw avatar Dec 10 '15 18:12 sitexw

@sitexw you should add @@||al.ly^$script too, please try it and feedback to me...

mballag avatar Dec 10 '15 20:12 mballag

@sitexw Looking forward to your reply,,,

mballag avatar Dec 11 '15 12:12 mballag

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.

Daijobou avatar Dec 14 '15 11:12 Daijobou

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 avatar Dec 15 '15 09:12 sitexw

@sitexw Did you get it? if so, is there any temporary solution for this issue?

mballag avatar Dec 15 '15 10:12 mballag

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).

Daijobou avatar Dec 15 '15 13:12 Daijobou

@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 avatar Dec 15 '15 14:12 sitexw

@sitexw even if I use the same link, please try it again, and if there any solution for this, please help me.

mballag avatar Dec 16 '15 07:12 mballag

@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); }

JordyVialoux avatar Dec 16 '15 10:12 JordyVialoux

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?

Daijobou avatar Dec 16 '15 11:12 Daijobou

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?

JordyVialoux avatar Dec 16 '15 11:12 JordyVialoux

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 =)

sitexw avatar Dec 16 '15 11:12 sitexw

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?

JordyVialoux avatar Dec 16 '15 11:12 JordyVialoux

Unfortunately, I think not, because the only way was via the popup, but if it is disabled, any falls in the water.

sitexw avatar Dec 16 '15 12:12 sitexw

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 :-)

JordyVialoux avatar Dec 16 '15 13:12 JordyVialoux

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.

Daijobou avatar Dec 16 '15 17:12 Daijobou

Agreed... @Melhosh Maybe try to research and resolve on your own? We all are contributing to this project - happy coding! :-)

JordyVialoux avatar Dec 16 '15 17:12 JordyVialoux

sorry for this, I did not mean that... and thank you for support

Melhosh avatar Dec 16 '15 17:12 Melhosh

Just a quick note, I'm testing safari v9.0.1 and AdBlocker is not being detected.

JordyVialoux avatar Dec 17 '15 10:12 JordyVialoux

@sitexw Is there any update about my issue?

mballag avatar Dec 17 '15 12:12 mballag

Happy new year :)
Any news about verison 4?

In Firefox 43 with ABP its not working.

Daijobou avatar Jan 24 '16 14:01 Daijobou

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.

shoestar avatar Jan 25 '16 10:01 shoestar

up! In Firefox 43 with ABP its not working correctly.

halyvin avatar Mar 01 '16 08:03 halyvin

Hi guys, is there any capability to detect ad blocking for mobile?

JordyVialoux avatar Apr 18 '16 12:04 JordyVialoux

The V4, yes.

sitexw avatar Apr 18 '16 14:04 sitexw

Hi, "Adblock-Pluse" can bypass it, if you add "$elemhide", "$xmlhttprequest", "$script", on filters.

Kindly Is there any solution for this issue

Melhosh avatar Apr 18 '16 16:04 Melhosh

Yes indeed, but if you use these tags, advertising works =)

sitexw avatar Apr 18 '16 19:04 sitexw

@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?

talha-asad avatar Jul 11 '16 08:07 talha-asad

Will you be able to have a option to "re load" ads if they are being blocked?

master3395 avatar Mar 05 '17 00:03 master3395

is V4 still coming? really like your project!

vesper8 avatar Mar 21 '17 15:03 vesper8

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.

sitexw avatar Mar 23 '17 00:03 sitexw

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!

infromthecold avatar Aug 29 '17 06:08 infromthecold

@sitexw Accept PR #70 plz

ViieeS avatar Oct 19 '17 12:10 ViieeS

Is it planned to develop the project?

avdeev avatar Apr 12 '18 16:04 avdeev

Hey! Valentin, where is you? (((

LStester avatar Jun 10 '20 07:06 LStester