Content Blocking by CSS in Safari
ahknight writes "There's a nice summary of how to get various kinds of content, in this case ads, blocked from being displayed via a custom stylesheet you add to your browser. This is mainly for Gecko-based browsers and rather old news, but the good news is that it also appears to work in the ... umm ... latest version of Safari."
safari already was blocking quite efficiently those nasty popups, but with this I don't even need to edit my host file to avoid having the ad banners ! cool
Music is the language of the heart, the sound of the soul. -Joe Satriani
I'd prefer to see the ads if it keeps the sites I enjoy reading in business.
Sorry - an HTML filter seem to have taken out the greater than & less than signs in my comment subject. Read as "Ad blocking isn't good"
I didn't mind ads for a while, but when certain sites (ahem) started putting in those huge mega-ads that take up more than half my browser window, I had to start doing some ad blocking to make the web usable. It was either that or learn to
read
text
that
looks
like
this.
Tragedy of the commons and all that. The people whose ads are being blocked should get angry at the idiots who force us to block ads by making their ads so huge, obnoxious and badly-placed.
GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
That's what tip jars and subscriptions are for. It costs, what, NOTHING to set one up via Amazon or PayPal? Ok, percent of profits, but no startup cost.
Better ROI than ads, I'd say, and the site looks cleaner for it.
So, if you are running a 1600x1200 window and larger fonts (anti-aliasing? I need no anti-aliasing!)
you
get
an
article
like
thi
If the morons would either
then there wouldn't be a problem - large browser users like me would either get an article that spans the available space (the width option) or could at least override the setting on the article text in our CSS (the common class option).
I've contacted several sites about this. For example, PBS (hosters of the Cringely articles) responded saying "Some people don't like long lines of text, so there!" (OK, then they can resize their windows to get the line length they want.)
Unfortunately, since every site uses a slightly different "width=", and since CSS does not allow you to say "width=[400..800]" or something like that, you have to have a seperate entry for each site, and when the webmaster(bater) changes the layout you have to update your CSS and restart your browser.
I do wish people would realise that HTML is about giving enough info to my browser to render the page, not about being pixel-exact.
www.eFax.com are spammers
Now I hardly ever see ads, and the ads I don't see never get loaded in the first place, saving my bandwidth. Of course, that means that the web sites I visit never record a hits on their ad servers from me, whereas using the style sheet alone is completely transparent to the server.
Oh, and both the Proxy Auto Config and the Style Sheet hacks should work just fine with most web browsers, not just Mozilla and Safari.
anti-banner.css, and I don't assume you're using Mozilla. I'd be interested to hear if it works in other browsers (other than Opera/Mozilla/IE, that is), and in receiving instructions on how to use it in them.
Do you mean the one that has just appeared in Software Update - 1.0 Beta 2 (v73)?
I've been using Junkbuster to block ads for the past two years, but it's becoming pretty much ineffective since the blocklist is never updated.
Anyone know of a source for fresh blocklists, or a program that's updated more regularly? I'd prefer to keep it Junkbuster if possible.
Not in software update for me but it is right here:
http://www.apple.com/safari/download/
Now lets play with these CSS sheets!
---- The real Slashdot is still here. You just have to browse at -1 to read the comments.
Apple released Safari beta 73 this morning via software update. Enjoy.
Gabriel Ricard
Can't agree more! (Well, if you swore a bit more and were more insulting about the frigging muppets who do this kind of nonsense then I might ;).
:/
Web designers who INSIST on using fixed width for news sites (while wasting screen real estate) should be bloody well fired.
It's really quite simply wank - C|net do it, CNN do it, the BBC do it - and Wired do it too (with the actual articles). It's MORONIC and the ONLY justification they have is that they are too lazy/stupid to work out how to make things scale properly.
I've talked to several designers about this, and it stems from a mixture of them coming from traditional (magazine layout) based media (this is still what is taught at college's too, so many new designers still have this mentality) but also because of a lack of understanding of tables and no idea about how to use them creatively.
The only thing more wank that that is The Register's nonsense front page with articles all over they place. AND they are fixed width too the twats.
Note to moron web desginers: If you ARE going to do this sort of crap, at least center the page like C|Net do. It's still wank of course, but less so. AND there is NO excuse not do to do that... (other than being a lazy twat).
http://www.privoxy.org/
Blocking via CSS still downloads the ads to you. You just aren't seeing them. Although blocking via CSS is a valuable tool, particularly in some corporate environments, it does not replace the HOSTS file.
... what we really need is a way to block images with specific dimensions; most ads come in two specific sizes, the "wide narrow banner" and the "big fat box", both of which can be seen on Slashdot.
* And remember, it's spelled N-e-t-s-c-a-p-e, but it's pronounced "Mozilla."
For those not aware of this, it is possible to use this CSS method of blocking ads to block Flash advertisements .. arguably, the most annoying. Try something like so:
As you find Flash ads that aren't blocked, just add another entry for the size of ad you're seeing ... in my CSS, I have at least 8-10 such entries. Common sizes are:
open Directory Access.app and enable BSD Configuration files, get a good hosts file and pico /etc/hosts usually does fine for most of my content blocking needs. if i knew how to use vi i could probably cut a good four and half seconds off that.
For people with more money than energy, buy OmniWeb. I am way too lazy to do anything suggested here, OmniWeb does all my ad-blocking for me. And it is smarter about pop-ups than Safari, I see the pop-ups I need and not the ones I don't.