Sunday, February 01, 2009

disabling facebook ads in chrome

woot! i'm happy. earlier i installed privoxy to block ads with chrome since there's no adblock plugin yet. for most things, out of the box was fine, but not so with facebook. EVIL ADS!! seriously. so anyway, after lots of digging and swearing at privoxy cause it's not a simple interface, i finally fixed it!!! yay!! and partly for myself when i install it on other machines, and partly for anyone else who hates facebook ads, but likes chrome, here is what i did. (obviously this is for windows since that's all chrome is out for atm)

first, i had to open the default.filters file. it should be in program files\privoxy. you'll probably have to open it as administrator. if you scroll down, there is a section for site specific issues. somewhere in there (just so your file stays consistent) put in this text:

#################################################################
#
# facebook: CSS-based block for facebook side and sponsored ads.
#
#################################################################
FILTER: facebook CSS-based block for facebook side and sponsored ads.

s@</head>@\n<style type="text/css">\n\
/* Style sheet inserted by Privoxy's facebook filter. */\n\
\.adcolumn_wrapper {display : none !important;}\n\
\#home_sponsor {display : none !important;}\n\
\iframe {display : none !important;}\n\
</style>\n$0a

now, assuming you have privoxy's html configuration editing enabled, you can go to http://p.p (this opens the config files) and click "view & change current configuration". you want to edit user.action. once you're there click the "insert new section at top" button. under actions, click the edit button. this will take you to a list of radio buttons. look through them for your new facebook filter (it should say filter facebook) and click the radio button the enable it (it's the one in the green column). click submit to take you to the previous page and under url patterns: click add. in the dialog box that pops up, you want to type .facebook.com. refresh facebook and your ads should be blocked!!

No comments:

Post a Comment