Page 1 of 1

[DONE] Allow Flash and Java permanently for a site

Posted: Fri May 18, 2012 11:52 am
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

Re: Allow Flash permanently for a site

Posted: Fri May 18, 2012 8:30 pm
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?

Re: Allow Flash permanently for a site

Posted: Sat May 19, 2012 5:59 am
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+.

Re: Allow Flash permanently for a site

Posted: Sun May 20, 2012 12:30 pm
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!

Re: Allow Flash permanently for a site

Posted: Mon May 21, 2012 12:22 am
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.

Re: Allow Flash permanently for a site

Posted: Mon May 21, 2012 9:09 am
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.

Re: Allow Flash permanently for a site

Posted: Tue May 22, 2012 12:26 am
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.

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

Posted: Tue May 22, 2012 9:05 am
by Giorgio Maone
Done in latest development build 2.4.3rc1.

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

Posted: Tue May 22, 2012 1:59 pm
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.)

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

Posted: Wed May 23, 2012 8:32 am
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

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

Posted: Wed May 23, 2012 3:06 pm
by Stephen
Thanks!