Greasemonkey vs. NoScript

Ask for help about NoScript, no registration needed to post

Greasemonkey vs. NoScript

Postby harbinger » Sun Apr 19, 2009 2:26 am

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)
harbinger
 

Re: Greasemonkey vs. NoScript

Postby GµårÐïåñ » Sun Apr 19, 2009 7:53 am

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's Blog ] .:. [ Security Pack ] .:. [ Productivity ]
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
GµårÐïåñ
Lieutenant Colonel
 
Posts: 2820
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA

Re: Greasemonkey vs. NoScript

Postby Giorgio Maone » Sun Apr 19, 2009 4:17 pm

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
Giorgio Maone
Site Admin
 
Posts: 6834
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy

Re: Greasemonkey vs. NoScript

Postby GµårÐïåñ » Mon Apr 20, 2009 12:45 am

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's Blog ] .:. [ Security Pack ] .:. [ Productivity ]
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
GµårÐïåñ
Lieutenant Colonel
 
Posts: 2820
Joined: Fri Mar 20, 2009 5:19 am
Location: PST - USA

Re: Greasemonkey vs. NoScript

Postby Guest » Mon Jul 09, 2012 12:46 pm

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
Guest
 

Re: Greasemonkey vs. NoScript

Postby Giorgio Maone » Mon Jul 09, 2012 1:38 pm

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
User avatar
Giorgio Maone
Site Admin
 
Posts: 6834
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy


Return to NoScript Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest