Slashdot Mirror


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."

6 of 44 comments (clear)

  1. *cough* by Fweeky · · Score: 2, Informative

    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.

  2. The latest version of Safari? by shippo · · Score: 2, Informative

    Do you mean the one that has just appeared in Software Update - 1.0 Beta 2 (v73)?

  3. by the way... by gabe · · Score: 2, Informative

    Apple released Safari beta 73 this morning via software update. Enjoy.

    --
    Gabriel Ricard
  4. Blocks Flash ads! by Jobe_br · · Score: 2, Informative

    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:

    embed[type="application/x-shockwave-flash"][width= "468"][height="60"]
    {
    display: none !important;
    visibility: hidden !important;
    }

    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:

    • 468x60
    • 728x90
    • 120x600
    • 336x280
    • 300x250
    • 180x150
    • 240x400
    • 468x240
    • 120x600
    • 160x600
    • 336x280
  5. hosts is still the easy way to go by snuffdiddy23 · · Score: 2, Informative

    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.

  6. OmniWeb blocks ads with no effort by Anonymous Coward · · Score: 1, Informative

    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.