All mozilla-based browsers have a feature called “userContent.css”. It was designed to allow you to override page CSS with your own, e.g. for accessibility reasons.

It has mostly been used by people to remove ads, and I’ll share two examples with you.

Create ~/.gnome2/epiphany/mozilla/epiphany/chrome/userContent.css (you’ll probably need to create the chrome directory, too; other browsers use similar path names) and put these two rules in there:

a[href$=".pdf"]:after {font-size: 10px; color: red; content: " [PDF]";}
iframe[src*="devart.adbureau.net"] {display:none !important; height: 0; }
@-moz-document domain("mail.google.com") { button#ac_tr { color: red !important; } button#ac_dl { color: red !important; } }

The first one will postfix a red [pdf] to any link going to a PDF file. This is very valueable especially with Google scholar.

The second rule is an example on how to hide elements. This example hides some ads on deviantart. You can easily pick a wider term or grab some of the existing rulesets.

The third rule will color the “delete” button in Gmail red, so you find it easier. Since it moves around (UI hazard; “delete forever” replaces “archive” button in spam and trash folders.) this is quite nice to have.

But if you want to go for default ads filtering, I’d suggest to use some of the adblock extensions. These userContent tricks are mostly useful for adding rules that the extension didn’t catch.