Selectively Allowing JS (without addons) (with Privoxy?)

Need help with C, C++, perl, python, etc?

Selectively Allowing JS (without addons) (with Privoxy?)

Postby bentHnau » 2018-11-02 23:47

I want to write some sort of program(s) to selectively allow Javascript (rather than allowing/disallowing all scripts on every site I visit), but I don't know where to start. I know how to program and identify scripts on sites, I just don't know what sort of things to write and how to get my code interacting with a browser. Can somebody point me to some sort of tutorial or similar resource? My internet searches haven't been fruitful.

I'm very bad at learning by example (especially if the example is undocumented code) so looking at the source for someone's addon is not really an option.

Since I'm already filtering web content with Privoxy, I was thinking I could simply use the external filters feature:

8.5.14. external-filter

Typical use:
Modify content using a programming language of your choice.

Effect:
All instances of text-based type, most notably HTML and JavaScript, to which this action applies, can be filtered on-the-fly through the specified external filter. By default plain text documents are exempted from filtering, because web servers often use the text/plain MIME type for all files whose type they don't know.)


But again, I have no idea how to start.
Debian Stretch x64 on a Dell XPS 17 laptop
bentHnau
 
Posts: 123
Joined: 2014-01-07 01:43
Location: California

Re: Selectively Allowing JS (without addons) (with Privoxy?)

Postby debiman » 2018-11-03 10:21

why don't you just use noscript?

PS: which browser?
User avatar
debiman
 
Posts: 3015
Joined: 2013-03-12 07:18

Re: Selectively Allowing JS (without addons) (with Privoxy?)

Postby bentHnau » 2018-11-03 16:52

debiman wrote:why don't you just use noscript?

PS: which browser?


Ever since I got a warning in Iceweasel about addons having access to data I send through the browser, I stopped trusting addons. I don't know how they work (NoScript's source was undocumented), and I may as well create my own tool if I'm going to try to figure out how they work.

Anyways, qupzilla is my main browser, although I do use icecat for things that absolutely require JS. If I can use Privoxy, it will work with any browser.
Debian Stretch x64 on a Dell XPS 17 laptop
bentHnau
 
Posts: 123
Joined: 2014-01-07 01:43
Location: California


Return to Programming

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable