Help - Search - Members - Calendar
Full Version: TargetAlert extension
Neowin Forums > Help & Discussion Center > Software Discussion & Assistance > Web Browser Discussion > Firefox (Gecko)
em_te
There's this extension called TargetAlert that displays an image next to links that point to files with specific extensions. So if there is a link to a .pdf file, it will show the Adobe logo next to that link. Well there's nothing special about that except that when I went to read the comments to that extension, I found one comment that tells you how to do it without any extensions and only by editing your "userContent.css" file, which I found rather neat.

To do it, just add the following code to your userContent.css file:
CODE
a[href^="mailto:"]:before {
 content: url("moz-icon://.EML?size=16");
}
a[href$=".pdf"]:before {
 content: url("moz-icon://.PDF?size=16");
}
a[href$=".exe"]:before {
 content: url("moz-icon://.EXE?size=16");
}
a[href$=".doc"]:before {
 content: url("moz-icon://.DOC?size=16");
}
a[href$=".xls"]:before {
 content: url("moz-icon://.XLS?size=16");
}
Molgar
Nice, thanks!!!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.