How to block inline userscript (greasemonkey)?
How to block inline userscript (greasemonkey)?
Guys,
Big fan of NoScript and first time posting, please excuse if this is not the right forum and point me to the right direction.
I noticed that some tracking codes/websites have inline GreaseMonkey/UserScript such as Tumblr tracker Unfollower Hater. On one website, where it was probably poorly inserted, I saw nearly 500 lines of GreaseMonkey related javascript embedded in it toward the end / after the end html tag.
My question: is there a way to block execution of all inline GreaseMonkey/UserScript scripts within a page/domain?
Thanks,
Big fan of NoScript and first time posting, please excuse if this is not the right forum and point me to the right direction.
I noticed that some tracking codes/websites have inline GreaseMonkey/UserScript such as Tumblr tracker Unfollower Hater. On one website, where it was probably poorly inserted, I saw nearly 500 lines of GreaseMonkey related javascript embedded in it toward the end / after the end html tag.
My question: is there a way to block execution of all inline GreaseMonkey/UserScript scripts within a page/domain?
Thanks,
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0
Re: How to block inline userscript (greasemonkey)?
I don't understand. Greasemonkey scripts are provided by *you*. If they're not doing what you want, then change them.
Scripts provided by the site are not Greasemonkey/user scripts.
Scripts provided by the site are not Greasemonkey/user scripts.
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.
True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.
True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0
Re: How to block inline userscript (greasemonkey)?
@100: I went to that site and I'm not seeing what you're seeing. Can you post one such script here? (wrap in code tags please)
Also, other than NoScript, what addons (& versions) do you have?
Also, other than NoScript, what addons (& versions) do you have?
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; OpenBSD amd64; rv:26.0) Gecko/20100101 Firefox/26.0 SeaMonkey/2.23
Re: How to block inline userscript (greasemonkey)?
I'm curious, I want to know if it possible to allow Greasemonkey script to run but disable the website's script. Although some userscript/Greasemonkey does work without enabling NoScript on that domain some/most userscript will not function properly.
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.31 (KHTML like Gecko) Chrome/26.0.1410.63 Safari/537.31
Re: How to block inline userscript (greasemonkey)?
I don't think Greasemonkey can do that (not sure, because I've never gotten it to work at all), but Scriptish can in most cases.
Also, NoScript has a feature surrogate scripts that can run conditionally based on site permissions status.
Also, NoScript has a feature surrogate scripts that can run conditionally based on site permissions status.
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Windows NT 5.1; rv:32.0) Gecko/20100101 Firefox/32.0 SeaMonkey/2.29
-
oakoi2
Re: How to block inline userscript (greasemonkey)?
I might have wrote it in a confusing way.
I mean like so (example):
Using NoScripts:
Allow "mozilla.com" (using NoScript) so it mean it can run everything, JavaScript (website) and JavaScript (user / greasemonkey) , Plugins, HTML5(?)
What I essentially want to do is like so;
Allow "mozilla.com" (using NoScript) so it mean it can run everything, JavaScript (website) and JavaScript (user / greasemonkey) , Plugins, HTML5(?)
"Limited" Allow "firefox.com", e.g. Only allow JavaScript (user / greasemonkey), block everything else.
If you did understood what I was asking and answer with the surrogate solution, then I apologize. It just seem a bit complicated and annoying to use.
I mean like so (example):
Using NoScripts:
Allow "mozilla.com" (using NoScript) so it mean it can run everything, JavaScript (website) and JavaScript (user / greasemonkey) , Plugins, HTML5(?)
What I essentially want to do is like so;
Allow "mozilla.com" (using NoScript) so it mean it can run everything, JavaScript (website) and JavaScript (user / greasemonkey) , Plugins, HTML5(?)
"Limited" Allow "firefox.com", e.g. Only allow JavaScript (user / greasemonkey), block everything else.
If you did understood what I was asking and answer with the surrogate solution, then I apologize. It just seem a bit complicated and annoying to use.
Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; en) Presto/2.9.168 Version/11.52
Re: How to block inline userscript (greasemonkey)?
Oh, sorry for the misunderstanding. It would have helped if you started a new thread for that, because your question is unrelated to the OP.
Anyway, the option you're looking for is
NoScript Options > Embeddings > Apply these restrictions to whitelisted sites too
To whitelist sites for plugin content, use
about:config -> noscript.allowedMimeRegExp
Anyway, the option you're looking for is
NoScript Options > Embeddings > Apply these restrictions to whitelisted sites too
To whitelist sites for plugin content, use
about:config -> noscript.allowedMimeRegExp
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20140618 Firefox/24.0 PaleMoon/24.6.2
Re: How to block inline userscript (greasemonkey)?
Actually, I don't think that that is what oakoi wants...s/he wants to run userscript without allowing the domain's own scripts.barbaz wrote: Anyway, the option you're looking for is
NoScript Options > Embeddings > Apply these restrictions to whitelisted sites too
And the answer is, if the userscript runs in the page context, then there is no way for NoScript to tell them apart, whereas if it runs in a privileged context, then it's allowed already.
======
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.
True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Thrawn
------------
Religion is not the opium of the masses. Daily life is the opium of the masses.
True religion, which dares to acknowledge death and challenge the way we live, is an attempt to wake up.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:32.0) Gecko/20100101 Firefox/32.0
Re: How to block inline userscript (greasemonkey)?
@Thrawn: That is the question I answered with this postThrawn wrote:Actually, I don't think that that is what oakoi wants...s/he wants to run userscript without allowing the domain's own scripts.barbaz wrote: Anyway, the option you're looking for is
NoScript Options > Embeddings > Apply these restrictions to whitelisted sites too
And the answer is, if the userscript runs in the page context, then there is no way for NoScript to tell them apart, whereas if it runs in a privileged context, then it's allowed already.
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (Windows NT 5.1; rv:32.0) Gecko/20100101 Firefox/32.0 SeaMonkey/2.29
-
oakoi2
Re: How to block inline userscript (greasemonkey)?
Thank you. Having to use create rules each time via about:config is rather time consuming, I guess I will go make a request in NoScript Wishlist.
Considering how the thread is related to what I wanted to know I did not think creating a new thread was appropriate.
Considering how the thread is related to what I wanted to know I did not think creating a new thread was appropriate.
Opera/9.80 (Windows NT 6.1; U; en) Presto/2.9.181 Version/12.00
Re: How to block inline userscript (greasemonkey)?
In what way?oakoi2 wrote:Having to use create rules each time via about:config is rather time consuming
If it's because of minifying the code to fit it into the pref, you could put the surrogate script's file: URL instead of the JS code. But note that changes to the script don't take effect immediately in that case.
My apologies for the misunderstanding, when I said that I didn't realize that you weren't asking something like "how do I allow only some (Temp)Allowed sites to run plugin content".oakoi2 wrote:Considering how the thread is related to what I wanted to know I did not think creating a new thread was appropriate.
*Always* check the changelogs BEFORE updating that important software!
Mozilla/5.0 (X11; Linux i686; rv:32.0) Gecko/20140924 SeaMonkey/2.29.1pre