Greasemonkey vs. NoScript

Ask for help about NoScript, no registration needed to post
harbinger

Greasemonkey vs. NoScript

Post by harbinger »

Is there a method to resolve conflicts between Greasemonkey & NoScript?
Perhaps something in about:config?
Even if it requires some modifications to the scripts.

Otherwise, detection of locally based scripts?

Regards.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8 (.NET CLR 3.5.30729)
User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3369
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

Re: Greasemonkey vs. NoScript

Post by GµårÐïåñ »

I believe if you have chrome:// enabled, it works just fine and I think that's enabled by default/mandatory by NoScript. Or am I missing something? sorry if I am wrong.
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8 AdblockPlus/1.0.1 NoScript/1.9.1.91 RequestPolicy/0.5.4 FirePHP/0.2.4
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Greasemonkey vs. NoScript

Post by Giorgio Maone »

There's no conflict between GreaseMonkey and NoScript.
However some user scripts may inject script fragments or script inclusions inside the web page: those injected/included scripts are at the content level, therefore they don't have chrome:// privileges and are subject to NoScript's permissions.
Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8 (.NET CLR 3.5.30729)
User avatar
GµårÐïåñ
Lieutenant Colonel
Posts: 3369
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA
Contact:

Re: Greasemonkey vs. NoScript

Post by GµårÐïåñ »

Understood. I thought of chrome with respect to Greasemonkey itself, not the scripts it provides. Since there is no conflict then what I said clearly doesn't apply. :lol: Thanks.
~.:[ Lï£ê ï§ å Lêmðñ åñÐ Ì Wåñ† M¥ Mðñê¥ ßå¢k ]:.~
________________ .: [ Major Mike's ] :. ________________
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8 AdblockPlus/1.0.1 NoScript/1.9.1.91 RequestPolicy/0.5.4 FirePHP/0.2.4
Guest

Re: Greasemonkey vs. NoScript

Post by Guest »

Hi!

Sorry for resurrecting this old thread, but it's among the first search result for this "problem".

I recently ran into the mentioned problems with NoScript and Greasemonkey - the script itself executes just fine but script embedded into the page require JS execution priviledges for the page - and by chance found a solution.

It's really simple:
  • Don't use the normal ".onclick" etc. properties but use ".addEventListener("click", ...)" instead.
  • Don't use a string for the deferred function but use a function object directly.
This wont work:

Code: Select all

var someNode = ...
someNode.onclick = "alert('foo');
but this will:

Code: Select all

var someNode = ...
someNode.addEventListener("click", function () {alert("foo");});
Mozilla/5.0 (X11; Linux i686 on x86_64; rv:11.0) Gecko/20100101 Firefox/11.0
User avatar
Giorgio Maone
Site Admin
Posts: 9524
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Greasemonkey vs. NoScript

Post by Giorgio Maone »

Guest wrote: I recently ran into the mentioned problems with NoScript and Greasemonkey - the script itself executes just fine but script embedded into the page require JS execution priviledges for the page - and by chance found a solution.
Thank you for sharing.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0.1
Post Reply