Blocking specific Javascript

Discussion on how to block ads on a certain site, why your filter doesn't work or how it can be optimized

Blocking specific Javascript

Postby Outcast » Sun Feb 01, 2009 10:50 am

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.
Outcast
 
Posts: 11
Joined: Wed Sep 20, 2006 12:01 pm

Postby Hubird » Sun Feb 01, 2009 10:51 am

If you post a link to the site that uses the script we should be able to help.
User avatar
Hubird
 
Posts: 2850
Joined: Thu Oct 26, 2006 2:59 pm
Location: Australia

NSFW!!!

Postby Outcast » Sun Feb 01, 2009 11:00 am

Outcast
 
Posts: 11
Joined: Wed Sep 20, 2006 12:01 pm

Postby fanboy » Sun Feb 01, 2009 12:15 pm

Code: Select all
@@|http://ads.xxx.adbrite.com/*.hshare.net*
and possibly, @@.hshare.net/adimages/
User avatar
fanboy
 
Posts: 3344
Joined: Sun Jun 17, 2007 4:45 am

Postby fanboy » Sun Feb 01, 2009 12:34 pm

Added new playasia iframes to Adult-alpha list :arrow: :arrow: :arrow:
User avatar
fanboy
 
Posts: 3344
Joined: Sun Jun 17, 2007 4:45 am

Postby Outcast » Sun Feb 01, 2009 8:08 pm

Sorry mate, doesn't work.
Outcast
 
Posts: 11
Joined: Wed Sep 20, 2006 12:01 pm

Postby fanboy » Sun Feb 01, 2009 9:11 pm

Code: Select all
@@.hshare.net/adimages/


seems to work at the moment
User avatar
fanboy
 
Posts: 3344
Joined: Sun Jun 17, 2007 4:45 am

Postby molitar » Sun Feb 22, 2009 6:36 pm

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.
molitar
 
Posts: 9
Joined: Sun Feb 22, 2009 10:30 am

Postby Adblock Plus Fan » Sun Feb 22, 2009 10:47 pm

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
User avatar
Adblock Plus Fan
 
Posts: 1255
Joined: Sat Feb 24, 2007 12:08 pm

Postby molitar » Mon Feb 23, 2009 12:36 am

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.
molitar
 
Posts: 9
Joined: Sun Feb 22, 2009 10:30 am

Postby Adblock Plus Fan » Mon Feb 23, 2009 2:26 am

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.
User avatar
Adblock Plus Fan
 
Posts: 1255
Joined: Sat Feb 24, 2007 12:08 pm

Postby Outcast » Mon Feb 23, 2009 3:52 pm

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!
Outcast
 
Posts: 11
Joined: Wed Sep 20, 2006 12:01 pm

Postby Adblock Plus Fan » Tue Feb 24, 2009 1:33 am

Outcast wrote:This works
Note that the other suggestion prior to mine also works quite well.
User avatar
Adblock Plus Fan
 
Posts: 1255
Joined: Sat Feb 24, 2007 12:08 pm

And if its not externally linked?

Postby Magnethead » Thu Jun 04, 2009 1:16 pm

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

Re: And if its not externally linked?

Postby codegirl.dk » Thu Jun 04, 2009 4:00 pm

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.
codegirl.dk
 

Next

Return to Filters for Adblock Plus

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 7 guests