Help with blocking CPALead overlay ads?

edited November 2009 in Style Development
I am trying to make a style that would block those annoying "Take this survey to unlock premium content" ads.

So far I have a small bit that seems to be killing the overlay pretty nicely... But it won't let me scroll down...

I assume it's because of something from this little excerpt of a piece of javascript in the head of the html:

so my question is, is there anyway to remove a script tag from the head of an html page, or does anyone have any ideas as how to null the effects of the script using css?

I really don't like the idea that they are messing with my scrollbars... And I don't want to have to disable javascript to be able to scroll on one freakin' page.

This is what I'm using to kill the overlays:
@-moz-document domain(""), domain("") {
div[id ^='obj'] {width:0px !important;height:0px !important;}

and here is an example page:


  • edited November 2009
    It seems that the id for the div's containing the ads are unique for each and every site, meaning that in order to block the ads (To my knowledge) by hiding the divs, you would need to have a huge list for it to work on each and every site. A simpler solution would be to use adblock, and filter everything from "*";


    Oh sorry. Didn't read the post carefully.
    The scrolling inhibitor is actually located in one of the divs somehow. This is the problematic code:
    <div id="obj3c5be6328b5f6a0a5980341230b8ac05" style="display: block; position: absolute; top: 0pt; left: 0pt; z-index: 1100000; width: 100%; height: 1209px;"/>

    If you can get rid of that, instead of changing the display to none, then your problem will be solved.
  • Should be able to do
    div[id=^="obj"] { display: none !important; }
  • I use these:

    Adblock Plus

    Adblock Plus: Element Hiding Helper

    Rick752's EasyList Filters for Adblock Plus



    You could use noscript on that page. I tested this setting on the page:

    = allowed list

    = forbidden list

    I don't think scripts need to run for the video to work. If that's true the filter that telittleone mentioned is another option.
  • div[id ^='obj'] {width:0px !important;height:0px !important;}
    was my approach to getting rid of the :
    <div id="obj3c5be6328b5f6a0a5980341230b8ac05" ...>

    I seem to remember using this at first:
    div[id^="obj"] { display: none !important; }
    as Jason Barnabe suggested (sans the extra "=" before the ^), but as I remember, there were complications.
    However, now, I cannot remember what they were & everything seems to be working fine as far as I can tell...

    So I think what I'll do is just post it up as a Userstyle, see how many complaints I get & hope for some extra constructive user input.

    And ekbworldwide, while I know that there are other solutions available, I am trying to create more solutions, especially one that don't include installing addons that I don't really need since I have a hosts file that blocks almost every other known advertiser.

    I have a vendetta against this type of obtrusive advertising. CPALead is trash & I'm trying to make sure it gets put in its proper place. I even have a bookmarklet for Google Chrome that will kill it with the click of a button, but it doesn't work right in Firefox.

    But thanks for your help guys, if I need more help, I'll surely be back...
Sign In or Register to comment.