Development :  K-Meleon Web Browser Forum
K-Meleon development related discussions. 
div "windows" ads
Posted by: JohnHell
Date: July 02, 2005 12:48AM

Can someone make, as the flash killer, make a div "windows" ads killer?

I'm not good at javascript so... I can't do much.

Options: ReplyQuote
Re: div "windows" ads
Posted by: Drahken
Date: July 02, 2005 10:25PM

You can use your usercontent.css file to stop those. Most of them are conveniently named "adlyaer" or some such, and can easily be blocked by adding
#adlayer {display:none !important;}
to your usercontent.css file. To get the exact id or class you need, you'd have to look at the source of the page in question (or you can post a link here, and I'll take a look).

Options: ReplyQuote
Re: div "windows" ads
Posted by: JohnHell
Date: July 05, 2005 10:49PM

The thing is to block all because these layers-divs are the new popups replacement that can be blocked directly. Maxthon an interface to IE does it.

The way I thought to block is to know the z-index but how do you know when the z-index of the div is "X"? (with x i mean a number)

Options: ReplyQuote
Re: div "windows" ads
Posted by: kko
Date: July 06, 2005 11:25AM

div[style~="z-index:"] { display: none !important; }

will block all div's that have a z-index attribute, regardless of the value. If you omitt the leading "div", all elements will be affected, not only div's. You can also combine multiple style attributes, for example:

div[style~="z-index:"][style~="position:"] { display: none !important; }

Options: ReplyQuote
Re: div "windows" ads
Posted by: JohnHell
Date: July 06, 2005 03:00PM

That is nice, but yesterday... in some page I don't remember now I view the source of the page and there was a layered ad that hasn't that attribute sad smiley

I think that kill this ads can be a little hard :/

If I found it again I'll post smiling smiley

Options: ReplyQuote
Re: div "windows" ads
Posted by: JohnHell
Date: July 06, 2005 03:02PM

sorry: find*

Options: ReplyQuote
Re: div "windows" ads
Posted by: JohnHell
Date: July 13, 2005 03:55PM

Ok, here we have some examples that produces those ads. How can we block them?.

http://usuarios.lycos.es/calaberajoe/ads.txt

Options: ReplyQuote
Re: div "windows" ads
Posted by: kko
Date: July 13, 2005 06:11PM

There is no chance to block this div without knowing the context (in what other elements is it nested?), since it has neither an id nor a class attribute. The contents of the div is absolutely irrelevant! Give me the url of a page where this div occurs and I will have a look...

Besides, user defined style sheets are not made to block ads. Using them for this purpose is actually a misuse IMHO. And it is as inadequate as using a hosts file or a dns-proxy to block images from ad-servers. Those style sheets enable you to customize arbitrary sites. And of course customizing includes ad-blocking. But the effort is relatively high, if you want to avoid "false positives". So only sites that you visit (very) often, are worth a try.

Options: ReplyQuote
Re: div "windows" ads
Posted by: Eyes-Only
Date: July 15, 2005 12:24AM

Hmm... As we say in Maine, "I'm as numb as a hake" meaning :"I'm pretty stupid at this." hehe! But I have something on my website page which is NOT an ad, but placed there to be useful more to ME than anyone else, okie? It's a weather block with loads of info regarding the weather outside my window here.

My problem is that my extensive userContent.css file is blocking this from showing and I haven't the first clue as to where to look. Since I don't make it to these forums as often as I'd like would one of you gentlemen be so kind as to visit my homepage and contact me from my website address near the bottom, and and possibly assist me in unblocking this? I thought maybe I could send you my file in a zip, you'd see the page and know which spot I'm talking about and would therefore know what's being blocked, and could send me back the corrected file?

You don't know how much I'd appreciate this! smiling smiley

My URL is after my sigblock below:

Amicalement!

Eyes-Only
"L'Peau-Rouge d'Acadie"
http://eyes-only.dyndns.org/jimmymac/

Options: ReplyQuote
Re: div "windows" ads
Posted by: Eyes-Only
Date: July 15, 2005 04:29PM

I would like to thank KKO for answering my request in private and for fixing my problem perfectly! smiling smiley

Now it is solved and I can finally view my weather info box on the front of my homepage without having to visit the weather page itself until the end of the day.

Thanks so much KKO! I really appreciate it! And if I can ever return the favour in some small way, let me know, okie? smiling smiley

Amicalement mes amis!

Eyes-Only
"L'Peau-Rouge d'Acadie"
http://eyes-only.dyndns.org/jimmymac/

Options: ReplyQuote
Re: div "windows" ads
Posted by: JohnHell
Date: July 16, 2005 05:36PM

The urls (from a lot...) could be: http://www.crackmanworld.com/ and http://www.pcttracker.com/

I know they aren't common websites tongue sticking out smiley but some others are begining to use this type of ads and is ... annoy, very annoying :/

Options: ReplyQuote
Re: div "windows" ads
Posted by: kko
Date: July 18, 2005 11:56AM

I've visited your URL's, JohnHell. The popup-div at crackmanworld.com has a z-index and is blocked by our rule. At pcttracker.com, I couldn't find any popup-divs at all. So, I do not have any imagination of how I could help you further...

Options: ReplyQuote
Re: div "windows" ads
Posted by: JohnHell
Date: July 19, 2005 12:02AM

Mmm maybe they changed recently at crackmanworld :/

Well, but you now got what I was meaning and why I was searching for a solution.

Options: ReplyQuote
Re: div "windows" ads
Posted by: Drahken
Date: July 19, 2005 09:45PM

The easiest way to block these divs when they have an ID (or sometimes a class will work, if it's something that only applies to the ads on the page and not the actual content) is to simply set the ID to display:none. If they ha no ID (or one that is also used in the worthwhile content in the page) but they do have a z-index set, then you can use that to block them. If they have neither an ID nor a z-index, then you have to look for something else that differentiates them from other divs. If they have an unusual height and width defined, then you could use that. If they have a name defined, you can use that. Basically, you have to look at all the properties and attributes defined in the div tag and see if you can find something (or a group of things) that will set that one apart from all others.

If you're using a KM version that has a 1.8x GRE, then you have the option of site-specific css. This way, you could block divs with the class "welcome_div" on site.com, but allow divs with the class "welcome_div" on all other sites.


The one on the pctracker site is generated by javascript. Turning javascript off on that site wil prevent it. I suspect it generated by one of these 2 scripts:
http://www.impresionesweb.com/r/banner_iw.php?idrotador=1422&tamano=300x250
http://www.impresionesweb.com/p/popup.php?idrotador=1403
Use your PAC file or ad blocking proxy, and block impresionesweb and/or idrotador for a more permanent solution.

Options: ReplyQuote
Re: div "windows" ads
Posted by: kko
Date: July 20, 2005 09:43AM

If you want to learn more about CSS, take a look into the W3C's CSS2 Specification. Chapter 5 Selectors describes what we need here: How to address specific HTML elements in CSS.

For beginners, there are more helpfull "inoffical" CSS references on the web. Perhaps somebody else can give you a link (the one I use is in german).

Options: ReplyQuote
Re: div "windows" ads
Posted by: Drahken
Date: July 20, 2005 01:56PM

I recommend W3C Schools: http://www.w3schools.com/css/default.asp
They also have tutorials for HTML, XHTML, etc, and their stuff is all official (many of the unofficial sites instruct you on outdated code, or tell you improper code).

Options: ReplyQuote


K-Meleon forum is powered by Phorum.