Page 1 of 1
Blocking inline scripts
Posted: Mon Jul 28, 2014 1:59 pm
by cebihiya
Hello. I want to create the rule, which will be locking all inline scripts on some site (but external JS must working). How I can do this?
My rule
Code: Select all
# User-defined rules. Feel free to experiment here.
Site example.org
Accept from example.org
Deny INCLUSION(SCRIPT, OBJ, SUBDOC)
doesn't work.

Re: Blocking inline scripts
Posted: Mon Jul 28, 2014 3:44 pm
by barbaz
I don't think that is possible in ABE.
Re: Blocking inline scripts
Posted: Mon Jul 28, 2014 8:42 pm
by Giorgio Maone
You can try with the following surrogate:
Code: Select all
addEventListener("beforescriptexecute", function(ev) { if(ev.target.textContent) ev.preventDefault() }, true);
Alternatively, you may want to check whether
this add-on works.
Re: Blocking inline scripts
Posted: Mon Jul 28, 2014 9:01 pm
by cebihiya
Giorgio Maone wrote:You can try with the following surrogate:
Code: Select all
addEventListener("beforescriptexecute", function(ev) { if(ev.target.textContent) ev.preventDefault() }, true);
Is it Greasemonkey script?
Giorgio Maone wrote:
Alternatively, you may want to check whether
this add-on works.
Thanks, I'll try.
Re: Blocking inline scripts
Posted: Mon Jul 28, 2014 9:12 pm
by Giorgio Maone
cebihiya wrote:Giorgio Maone wrote:You can try with the following surrogate:
Code: Select all
addEventListener("beforescriptexecute", function(ev) { if(ev.target.textContent) ev.preventDefault() }, true);
Is it Greasemonkey script?
more or less 