[DONE] Allow Flash and Java permanently for a site

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

[DONE] Allow Flash and Java permanently for a site

Post by Stephen »

Hi!

I use NoScript to block JS, Flash, ... in general and only allow it for certain sites.
While I can allow JS permanently, for Flash (and Webfonts) there's only entries in the NoScript menu to allow it temporarily. Am I doing something wrong here? It's quiet annoying to allow Flash for Youtube every time I restart the browser.

TIA, Stephen
Last edited by Giorgio Maone on Tue May 22, 2012 9:05 am, edited 2 times in total.
Reason: changed to an RFE, which was approved, so marked as TODO also
Mozilla/5.0 (X11; Linux i686 on x86_64; rv:11.0) Gecko/20100101 Firefox/11.0
User avatar
therube
Ambassador
Posts: 7929
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: Allow Flash permanently for a site

Post by therube »

See if this covers it, How to permanently allow an object (e.g. google talk)?

I tried various ways of:

Code: Select all

application/shockwave-flash@http://images10.newegg.com
application/x-shockwave-flash@http://images10.newegg.com
but didn't get it to work when click the CPU image here, Intel Core i5-3570K Ivy Bridge 3.4GHz (3.8GHz Turbo) LGA 1155 77W Quad-Core Desktop Processor Intel HD Graphics 4000 BX80637I53570K with newegg.com allowed, Flash blocked, & Apply to whitelisted sites too?
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20120518 Firefox/14.0a2 SeaMonkey/2.11a2
Tom T.
Field Marshal
Posts: 3620
Joined: Fri Mar 20, 2009 6:58 am

Re: Allow Flash permanently for a site

Post by Tom T. »

Stephen wrote:I use NoScript to block JS, Flash, ... in general and only allow it for certain sites.
While I can allow JS permanently, for Flash (and Webfonts) there's only entries in the NoScript menu to allow it temporarily. Am I doing something wrong here? It's quiet annoying to allow Flash for Youtube every time I restart the browser.
The simplest way is to go to NoScript Options > Embeddings, check "Forbid Flash" (and any others you wish to default-block), then uncheck (if checked) "Apply these restrictions to whitelisted sites too." This will allow Flash at all of your whitelisted sites (or temp-allowed sites), if that's OK with you.

However, it will also allow all the other stuff on that page -- Java, Silverlight, etc. -- at those allowed pages. You may not want this.

If this is satisfactory for you, cool. If not, we'll go in more complex directions. Let us know.

btw, NoScript 3.x for the desktop will have built-in specific permissions per-site, right in the GUI. Release was targeted by the end of 2011, but these pesky new web threats keep emerging... We're all looking forward to it, as soon as Giorgio can get it up and running. It should solve such problems.

Also see the "Click-to-Play" feature planned for Firefox 14+.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.28) Gecko/20120306 Firefox/12.0
Stephen

Re: Allow Flash permanently for a site

Post by Stephen »

Hi!

Thanks for your advise, but it didn't help :-/
therube wrote: See if this covers it, How to permanently allow an object (e.g. google talk)?
This looks promising but I had no luck either. I tried various things like

Code: Select all

shockwave-flash@http://s.ytimg.com
application/shockwave-flash@http://s.ytimg.com
application/x-shockwave-flash@http://s.ytimg.com
to allow Flash for Youtube videos. The first line is what NoScript uses in its menu, the third uses the Flash mimetype from about:plugins, the second one is a mix of both. None works :-/

Even the most simple version won't work

Code: Select all

shockwave-flash
application/shockwave-flash
application/x-shockwave-flash
Is there any official documentation for this preference besides the changelog?

Tom T. wrote:The simplest way is to go to NoScript Options > Embeddings, check "Forbid Flash" (and any others you wish to default-block), then uncheck (if checked) "Apply these restrictions to whitelisted sites too." This will allow Flash at all of your whitelisted sites (or temp-allowed sites), if that's OK with you.
No, that's too liberal for my taste. Even "trusted" sites use a lot of annoying plugins. The best thing would be to only allow certain objects but I guess that's too much to ask for... :-)
Tom T. wrote:NoScript 3.x for the desktop will have built-in specific permissions per-site, right in the GUI.
[...]
Also see the "Click-to-Play" feature planned for Firefox 14+.
Both look really interesting. So if I cannot get the "noscript.allowedMimeRegExp" to work I'll just wait some time.

Again, thanks for your help!
Mozilla/5.0 (X11; Linux i686 on x86_64; rv:11.0) Gecko/20100101 Firefox/11.0
Tom T.
Field Marshal
Posts: 3620
Joined: Fri Mar 20, 2009 6:58 am

Re: Allow Flash permanently for a site

Post by Tom T. »

This is a head-scratcher. Image

The changelog item to which you referred implies that literal syntax is acceptable.
v 1.9.9.86
+ mime/type@http://site.com syntax support for noscript.allowedMimeRegExp
So I tried that, for both youtube and ytimg, and it didn't work.

The NoScript "Features" Page and the name of the preference clearly indicate regexp is needed.
So I tried many different possibilities.

Giorgio's response to another such request did not have the leading ^
so I tried with and without that.

MIME type was taken directly from about:plugins,
application/x-shockwave-flash

then put into various regexp for both youtube and ytimg, with and without .swf suffix, wildcarding, etc. Something like

application/x-shockwave-flash@https?://.*\.youtube\.com -- with and without /etc., and the same with ytimg.com, with many variations.

No joy, and therube couldn't make it work, either. Time to ask Giorgio what is the secret.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.28) Gecko/20120306 Firefox/12.0
User avatar
Giorgio Maone
Site Admin
Posts: 9454
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: Allow Flash permanently for a site

Post by Giorgio Maone »

Actually the allowMimeRegExp trick works for any plugin except Java, Flash and Silverlight.
This was an old design decision, which I think can be revised in next development build.
Thanks for noticing.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0
Tom T.
Field Marshal
Posts: 3620
Joined: Fri Mar 20, 2009 6:58 am

Re: Allow Flash permanently for a site

Post by Tom T. »

Giorgio Maone wrote:Actually the allowMimeRegExp trick works for any plugin except Java, Flash and Silverlight.
This was an old design decision, which I think can be revised in next development build.
Thanks for noticing.
Excellent. Looking forward to this new feature, as I'm sure many users are. Thank you, Giorgio!

I'll change the topic title to an RFE marked as TODO.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.28) Gecko/20120306 Firefox/12.0
User avatar
Giorgio Maone
Site Admin
Posts: 9454
Joined: Wed Mar 18, 2009 11:22 pm
Location: Palermo - Italy
Contact:

Re: [DONE] Allow Flash and Java permanently for a site

Post by Giorgio Maone »

Done in latest development build 2.4.3rc1.
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0
User avatar
therube
Ambassador
Posts: 7929
Joined: Thu Mar 19, 2009 4:17 pm
Location: Maryland USA

Re: [DONE] Allow Flash and Java permanently for a site

Post by therube »

Nice, thanks :-).

Preference:

Code: Select all

noscript.allowedMimeRegExp
Value:

Code: Select all

application/x-shockwave-flash@http?://images10\.newegg\.com
Note that it needed the "x-" part, not just "shockwave-".
(And I only say that because I don't understand such things & it was with the x- where it worked.)
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball NoScript FlashGot AdblockPlus
Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20120521 Firefox/14.0a2 SeaMonkey/2.11a2
Tom T.
Field Marshal
Posts: 3620
Joined: Fri Mar 20, 2009 6:58 am

Re: [DONE] Allow Flash and Java permanently for a site

Post by Tom T. »

therube wrote:,,,, Note that it needed the "x-" part, not just "shockwave-".
(And I only say that because I don't understand such things & it was with the x- where it worked.)
Look in about:plugins. You'll see "MIME Type" in the first column.

Under "Shockwave Flash", you'll see MIME Type "application/x-shockwave-flash"
So that is what to use.

Same if you wish to use this for any other plugin -- Java, etc. Use what's listed in about:plugins, literally. (Copy/paste?)


And to Giorgio, Image
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.28) Gecko/20120306 Firefox/12.0
Stephen

Re: [DONE] Allow Flash and Java permanently for a site

Post by Stephen »

Thanks!
Mozilla/5.0 (X11; Linux i686 on x86_64; rv:11.0) Gecko/20100101 Firefox/11.0
Post Reply