Blocking specific Javascript

Posting here is no longer possible, please use the forum of a filter list project, such as EasyList
Outcast
Posts: 11
Joined: Wed Sep 20, 2006 12:01 pm

Blocking specific Javascript

Post 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.
User avatar
Hubird
Posts: 2850
Joined: Thu Oct 26, 2006 2:59 pm
Location: Australia
Contact:

Post by Hubird »

If you post a link to the site that uses the script we should be able to help.
Outcast
Posts: 11
Joined: Wed Sep 20, 2006 12:01 pm

NSFW!!!

Post by Outcast »

User avatar
fanboy
Posts: 3446
Joined: Sun Jun 17, 2007 4:45 am
Contact:

Post by fanboy »

Code: Select all

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

Post by fanboy »

Added new playasia iframes to Adult-alpha list :arrow: :arrow: :arrow:
Outcast
Posts: 11
Joined: Wed Sep 20, 2006 12:01 pm

Post by Outcast »

Sorry mate, doesn't work.
User avatar
fanboy
Posts: 3446
Joined: Sun Jun 17, 2007 4:45 am
Contact:

Post by fanboy »

Code: Select all

@@.hshare.net/adimages/ 
seems to work at the moment
molitar
Posts: 9
Joined: Sun Feb 22, 2009 9:30 am
Contact:

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

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

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

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

Post 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!
User avatar
Adblock Plus Fan
Posts: 1255
Joined: Sat Feb 24, 2007 11:08 am

Post by Adblock Plus Fan »

Outcast wrote:This works
Note that the other suggestion prior to mine also works quite well.
Magnethead

And if its not externally linked?

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

Re: And if its not externally linked?

Post 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.
Locked