From dpelleg+ at cs.cmu.edu Sat May 10 14:22:10 2003 From: dpelleg+ at cs.cmu.edu (Dan Pelleg) Date: Sat, 10 May 2003 14:22:10 -0400 Subject: [auton-users] hiding web ads with stylesheets Message-ID: <16061.17234.409926.915060@gargle.gargle.HOWL> Here's how to tell Mozilla to eliminate ads from webpages. (I know we all surf the web strictly for research purposes, but some of these conference sites can have annoying ads all over them!). First, find your mozilla preferences directory. In UNIX it's under your home directory named something like .mozilla/USERNAME/4d9a3ff1/chrome (it really is the parent of that, but the files discussed here go in the chrome directory). Next, download the file http://www.cs.cmu.edu/~dpelleg/userContent.css into that directory. Shut down mozilla and restart it. You're done. For the full effect compare how http://news.com.com/ and any articles linked from it look before and after you do this. More info, tips and tricks: - that file is human-readable and modifiable. You can easily refine the rules in it to better match the sites you visit. - it includes a rule to disable shockwave flash, commented out - after you change the file you'll need to restart mozilla - other CSS-aware browsers should be able to use it as well - in http://www.cs.cmu.edu/~dpelleg/opacity.css there's a version of it that still shows the ads, but very faintly. You will need to rename it to userContent.css after you download it. - there is more info at: http://www.oreillynet.com/pub/a/network/2000/07/21/magazine/css_anarchist.html?page=2 http://www.w3.org/TR/REC-CSS2/selector.html (note the file above actually uses a CSS3 selector, which is not documented here) - in theory you should be able to have an @import statement in your userContent.css so you could download the rule file from the web. This would allow a single maintainer to keep updating the rules for a group of people. However for some reason this doesn't work (mozilla doesn't even seem to try and fetch the URL). If anyone has a solution to that please tell me. Also, nothing to do with CSS, but if you haven't done so already, you should go to preferences/advanced/scripts&plugins and check off some boxes (try "open unrequested windows" and "move or resize existing windows"). -- Dan Pelleg