I use Adblock Plus, an extension for Firefox, which (among other things) adds a small tab above (less commonly below) flash animations. This allows the user to quickly block the flash movie by clicking the tab.
Now, a great web development utility called sIFR - Scalable Inman Flash Replacement allows developers much greater freedom of typographical effects and fonts to be used on blocks of text (without having to use your favourite image replacement technique). This works by replacing certain flagged elements with a flash movie and is usually found on one-liner headlines.
However, there is a draw back with using Adblock and visiting sites using the sIFR technique - the Adblock tab appears on all the replaced text. I’m sure it’s safe to say that no one will actually want to block this type of text and because this has just become too annoying for me, I’ve decided to do something about it!
By using another (web developer trusted) Firefox extension - View Rendered Source - you are able to view the current source the page is displaying, even after it has been affected by JavaScript. Alternative methods for viewing the rendered source (thrown in for free): using the Web Developer Extension by Chris Pederick or ctrl+a (select all) and view source selection.
Narrowing the affected area down I came up with the following CSS rule:
.sIFR-replaced embed.sIFR-flash[sifr=true] + div[adblocktab=true] {
display: none !important;
}
By placing this in Firefox’s user-defined CSS file (userContent.css), websites using the sIFR technique shouldn’t display the adblock tab above the replaced elements. You can edit the user-defined CSS file by following instructions from Mozilla or alternatively by using another extension - ChromeEdit.
Although, this is great for the user who can be bothered to change his user-defined CSS file. For those who can not (the masses), I’m proposing that Mike Davidson (the guy continually improving the technique) add the code to the default CSS which is included in the technique bundle. This means developers adding the technique won’t annoy users like myself as the Adblock tab will be hidden from within their own stylesheet. Also, any one who is currently using the technique (and is happening to read this), add it too!
A problem that could be abused is that websites whose adverts might be being blocked by Adblock will employ CSS similar to what I mentioned above (although, not the same as it is specific to the sIFR technique) to hide the Adblock tab. Although, we can’t stop the websites doing this, we can add more specific rules into the user-defined CSS file to re-show the tab. These should override the websites trickery and display the tab, which will again mean you can easily block their ‘in your face’ adverts.
Comments
Dylan
Website
Wednesday 12th April 2006
Mmm, the CSS you’ve provided didn’t work for me so I investigated the markup and the “adblocktab” attribute didn’t exist, but “adblockframe” did. Maybe you’re using a different version? I’m using 0.5.3.042.
I altered the CSS and removed the adjacent selector because the embed element actually appears after the div[adblockframe=”true”] on my end, and thus this adjacent selector wasn’t working. It seemed a little extraneous anyway, is there a reason why you included it? Here’s my altered version:
.sIFR-replaced div[adblockframe=true] { display: none !important }
trovster
Website
Thursday 13th April 2006
I am using Adblock Plus version 0.7, that could be the reason for the difference.
The reason why I included the extraneous selector information was specificity. I only want to hide the sIFR Adblock and nothing else.
Mark Wubben
Website
Saturday 15th April 2006
When Mike forwarded your mail a few days ago it didn’t quite click. Glad I found this post!
The problem with including this in sIFR itself is that, as you mentioned, it lets other sites use this as well, possibly resulting in an arms race between the sites and the Adblock team [1]. We’ve had this discussion with the Flashblock and Adblock team and in the end the Flashblock team added some CSS rules to hide the sIFR flash movie and display the alternate text instead.
[1]: Okay, now the cat is out of the bag they can already, but it’s not something to rely on.