Fun with Privoxy

Place to talk about all that new hardware and decaying software you have.

Moderator: General Mods

Post Reply
byuu

Fun with Privoxy

Post by byuu »

So, I've been messing around with Privoxy lately. It's like AdBlock on crack. Figured I'd share what I have, see if anyone else came up with anything cool.

I'll list the filter followed by the action. As always, add actions to the bottom of the file, to skip the whitelisting section.

With xkcd, you always have to mouse over images, and wait for the caption to appear. Then you have to read fast before it disappears. This filter will put the image title above the image. Always visible, and without the smallcaps.

Code: Select all

FILTER: xkcd Always show image titles
s|(<img src=".*" )title="(.*)" (alt=".*" />)|<div style='font-size: 0.8em; font-variant: normal;'>$2</div><br/>$1$3|gU

{ +filter{xkcd} +prevent-compression }
xkcd.com
.xkcd.com
Slashdot has this new annoying-ass comment box that floats around the page with you. This will nuke it from existence.

Code: Select all

FILTER: slashdot Remove comment box
s/(<div class=['"]commentwrap['"])/$1 style='display:none;'/U

{ +filter{slashdot} }
slashdot.org
.slashdot.org
And, my personal favorite, word filters. This one will convert GNU/Linux to Linux. Makes reading this page hilarious. This one is applied to everything, for obvious reasons. You can easily add more filters below to handle things like British<>American, etc.

Code: Select all

FILTER: linux Annoyance
s|GNU/Linux|Linux|g

{ +deanimate-gifs +filter{linux} }
/
grinvader
ZSNES Shake Shake Prinny
Posts: 5632
Joined: Wed Jul 28, 2004 4:15 pm
Location: PAL50, dood !

Post by grinvader »

Privoxy is nice.
皆黙って俺について来い!!

Code: Select all

<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
DOLLS (J) [!]
ZNES Developer
Posts: 215
Joined: Mon Aug 02, 2004 11:22 pm

Post by DOLLS (J) [!] »

Why are you capitalizing the second word?
kode54
Zealot
Posts: 1140
Joined: Wed Jul 28, 2004 3:31 am
Contact:

Post by kode54 »

Presumably filter description following one word filter name.
byuu

Post by byuu »

kode54 wrote:Presumably filter description following one word filter name.
Right.

Here's another one to bypass Hotmail's "Upgrade Your Browser" bullshit nag screen. Though to be honest, I'm 99% ready to drop that e-mail at this point.

Code: Select all

FILTER: hotmail Ignore browser upgrade nagscreen
s|(<a href=['"])(.*)(['"]>continue to Windows Live Hotmail</a>)|<meta http-equiv="refresh" content="0; URL=$1">|igU

{ +filter{hotmail} +prevent-compression }
.hotmail.com
.live.com
Code like that will work on other click-through ads, too. Eg the ones on deviantart, etc.
gllt
NO VOWELS >:[
Posts: 753
Joined: Sun Aug 31, 2008 12:59 pm
Location: ALABAMA
Contact:

Post by gllt »

My Privoxy in Arch is screwy so I can't get these working. Ah.
Post Reply