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:
document|style|if|var|em|id|function|else||window|getElementById|div|obj48dfb0e62ef53dc160c26788433c2d1a|body|gateid|objectz||yScroll|write|obj3f13cf4ddf6fc50c0d39a1d5aeb57dd8|none|documentElement|arrayPageSize|windowWidth|display|font|height|setAttribute|color|bodyloadtime|windowHeight||||text|xScroll|onoroff|video_controller|obje9805f420cf6313f17a4d807871d9938|video_bucket|setTimeout|obj3d6df9d6b61916e55451a4ffc7e45561|getElementsByTagName|background|wmode|width|5px|border|for|align|center|mygateway_iframe|self|transparent|objadf7e293599134777339fdc40ddfa818|hidden|index|checkForBody|margin|countdown|px|popup_delay|func|onload|arrayPageScroll|moz|clientWidth|getPageSize|size|innerHeight|ems|embeds|visibility|radius|nomoreajax|pageHeight|has_closebtn|clientHeight|padding|2px|return|pageWidth|false|eeaa52f3366768bca401dca9ea5b181dd|closebuttons|length|o217e342fc01668b10cb1188d40d3370e|dontscroll|getPageScroll|200|src|oldonload|12px|100|decoration|cff41e552dba792c96fcafeb701076aed|pn|000|opacity|scrollTop|150px|75|objfbbb76a10e33a4dc61102a3276927c71|weight|2000000|innerHTML|normal|scrollHeight|Microsoft|createOverlay|visible|appName|scrollMaxY|position|block|embed|navigator|myGatewayStart|Explorer|pageYOffset|absolute|300|new|Array|replace|innerWidth|offsetHeight|insertBefore|item|object|nx|Internet|c92e84fa86a270ea72d92c0293fd678ee|overflow|right|true|http|www|com|iframe|float|fff|addWidgetLoadEvent|top|zIndex|left|loadGatewayIframe|500|startGateway|secondpass|img|cpalead|hover|underline|scrollMaxX|0px|alpha|1000|closelink|filter|offsetWidth|line|scrollWidth|392|null|number_of_surveys|nextSibling|parentNode|OTkwMw|typeof|countdownStarted|isloaded|bodyexisted|removeChild|NO|482px|0pt|auto|break|allowtransparency|scrollbars|1100015|frameborder|72px||found|family|createElement|FFFFFF|1100000|Arial|18px|ref|referrer|cacheurl|aHR0cDovL3d3dy53YXRjaG91c2VvbmxpbmUuY29tL3NlYXNvbi00LzgxLUZyb3plbg|pointer|cursor|gray|solid|1px|1100005|black|ffffff|firstChild|closebtn|onclick|159|escape|about|blank|bold|location|scroll|webicons|Widget|Close|png|cross|mygateway_iframe_loader|contentWindow|subid|128||74|7302|pub|php'.split('|'),0,{}))

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("www.watchouseonline.com"), domain("crackip.com") {
div[id ^='obj'] {width:0px !important;height:0px !important;}

and here is an example page:
http://www.watchouseonline.com/season-4/81-Frozen

Comments

  • 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 "http://www.cpalead.com/*";

    -Edit-

    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
    https://addons.mozilla.org/en-US/firefox/addon/1865

    Adblock Plus: Element Hiding Helper
    https://addons.mozilla.org/en-US/firefox/addon/4364

    Rick752's EasyList Filters for Adblock Plus
    http://easylist.adblockplus.org/

    NoScript
    https://addons.mozilla.org/en-US/firefox/addon/722

    ____________________

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

    = allowed list
    megavideo.com
    watchouseonline.com

    = forbidden list
    google-analytics.com
    cpalead.com
    histats.com
    go4ent.com

    I don't think cpalead.com 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.