Page 1 of 1

Blocking JS with Privoxy

Posted: Mon, 12 Nov 2018, 21:17
by Mesh Malachi
How can I block Javascript with Privoxy? I'm pretty sure I need to use a filter, but +filter{*.js} and +filter{*javascript*} didn't work.

I'm trying to block JS by default and then whitelist scripts. I don't want to use add-ons.

Edit: +filter{whatever} is just the filter label; I see now that I have to define the filtering rule separately (using regular expressions) from the label. My problem is that I'm not sure what the rule should be. The *.js and *javascript* were guesses about the rule.

Re: Blocking JS with Privoxy

Posted: Mon, 12 Nov 2018, 22:07
by Mesh Malachi
Just found their mailing list, so I guess that's where I'll get my answer.

Re: Blocking JS with Privoxy

Posted: Wed, 14 Nov 2018, 17:05
by Fedor2
When i want to save clean html page

in the filter file:

Code: Select all

FILTER: clean-of-script Remove all script tag

then in the action file:
{ +filter{clean-of-script} }

Re: Blocking JS with Privoxy

Posted: Tue, 18 Dec 2018, 08:49
by nateliv
To add an additional site to the block list easily, first open the user.action file.
$ sudo gedit /etc/privoxy/user.action
You're going to make a backup, aren't you! Yes, good idea! Do that! Give yourself a pat on the back.
Read the readme.
Scroll to the very bottom of the file

to the bottom of the file.
In future, you can add others like so