Page 1 of 2

Blocking specific Javascript

Posted: Sun Feb 01, 2009 9:50 am
by Outcast
Hi anyway to bypass this javascript?

Code: Select all

<script type="text/javascript">
function _enabled() {
    window.location.href='http://www2.[censored - NSFW].net/sorry.html'
}
function _disabled() {}
var _abdDetectedFnc = '_enabled';
var _abdNotDetectedFnc = '_disabled';

</script>
It is actually Adblock Detector.

Posted: Sun Feb 01, 2009 9:51 am
by Hubird
If you post a link to the site that uses the script we should be able to help.

NSFW!!!

Posted: Sun Feb 01, 2009 10:00 am
by Outcast

Posted: Sun Feb 01, 2009 11:15 am
by fanboy

Code: Select all

@@|http://ads.xxx.adbrite.com/*.hshare.net*
and possibly, @@.hshare.net/adimages/

Posted: Sun Feb 01, 2009 11:34 am
by fanboy
Added new playasia iframes to Adult-alpha list :arrow: :arrow: :arrow:

Posted: Sun Feb 01, 2009 7:08 pm
by Outcast
Sorry mate, doesn't work.

Posted: Sun Feb 01, 2009 8:11 pm
by fanboy

Code: Select all

@@.hshare.net/adimages/ 
seems to work at the moment

Posted: Sun Feb 22, 2009 5:36 pm
by molitar
Appreciate this information.. But curious looking into the source page how did you determine that the directory to block is /adimage? I couldn't see anything mentioning adimage at all in the source. Even page info did not show any reference to the /adimage folder.

Posted: Sun Feb 22, 2009 9:47 pm
by Adblock Plus Fan
molitar wrote:how did you determine that the directory to block is /adimage?
ABP has this tool for analysis:
http://adblockplus.org/images/71.png
It basically tells use when there are certain javascript files we can block. Or it can tell us what ABP is currently blocking if we want to know which items we want to unblock. Depending on the sites, doing either of these above can prevent detection tricks like this one.
It is initiated by Ctrl+Shift+V

Posted: Sun Feb 22, 2009 11:36 pm
by molitar
Adblock Plus Fan wrote:
molitar wrote:how did you determine that the directory to block is /adimage?
ABP has this tool for analysis:
http://adblockplus.org/images/71.png
It basically tells use when there are certain javascript files we can block. Or it can tell us what ABP is currently blocking if we want to know which items we want to unblock. Depending on the sites, doing either of these above can prevent detection tricks like this one.
It is initiated by Ctrl+Shift+V
Excellent.. thanks for that tip.. I see how it works now trying it out myself.

Posted: Mon Feb 23, 2009 1:26 am
by Adblock Plus Fan
molitar wrote:I couldn't see anything mentioning adimage at all in the source.
I played a bit with that site just now. It looks like they have the code in external script files, so instead of whitelisting, you can also block this file:

Code: Select all

http://www2.hshare.net/functions_a.js
and their detection will break.

Posted: Mon Feb 23, 2009 2:52 pm
by Outcast
Adblock Plus Fan wrote:
molitar wrote:I couldn't see anything mentioning adimage at all in the source.
I played a bit with that site just now. It looks like they have the code in external script files, so instead of whitelisting, you can also block this file:

Code: Select all

http://www2.hshare.net/functions_a.js
and their detection will break.
This works perfectly. Thanks mate!

Posted: Tue Feb 24, 2009 12:33 am
by Adblock Plus Fan
Outcast wrote:This works
Note that the other suggestion prior to mine also works quite well.

And if its not externally linked?

Posted: Thu Jun 04, 2009 1:16 pm
by Magnethead
I have a site here that does the same but does not include a .js file, which can easily be blocked. They include it in the code of every specific .php file.

Code: Select all

<script type='text/javascript'>
jQuery(function() {
 var scripts = document.getElementsByTagName("script");
 for(var i = 0; i < scripts.length; i++) 
   var script = scripts[i];
   if (script && ((script.getAttribute("src") != null &&
script.getAttribute("src").match("http://m-serving.com")) ||
script.style.display == "none")) {
     parent.location.href = "http://www.bold.dk/beklager.php";
   }
 }
});
</script>	
How would I go about blocking this? NoScript does the trick but also blocks the poorly programmed dropdown menu used by this site (http://bold.dk). I would like to just be able to filter out the above mentioned specific script but I can't find a way.

Re: And if its not externally linked?

Posted: Thu Jun 04, 2009 4:00 pm
by codegirl.dk
Magnethead wrote: How would I go about blocking this?
I would like to know this as well. There is a major media blowup about adblocking in Denmark right now, and several major sites are using the hack mentioned to exclude users with adblocker. Would love to provide people with a better solution than using no-script.