Page 1 of 1

[Enhancement] Site permission bundle

Posted: Sun Sep 11, 2011 6:03 pm
by dasnyderx
While I love NS, I have been annoyed (only by a minor bit) by having to allow two or more script sources for a given site. Firstly, it's annoying to have to allow two scripts repeatedly for a given site, and secondly, when the page is loading, the NS pop-up focus keeps resetting to the top. For example, if I go to Youtube, I have to allow two script sources, youtube.com and ytimg.com. What about a bundle clearance/disallowance for a given service? It could work something like this:

1. Go to site of interest (e.g., youtube.com)
2. Temporarily allow youtube.com and ytimg.com
3. Once two or more scripts have been temporarily allowed (it doesn't make sense to have this option available for one script being allowed), have the pop-up option (called say, 'Save as bundle...') appear. Clicking or hitting return on the 'Save as bundle...' option, causes a pop-up to appear requesting a name for the bundle (with 'Cancel' and 'Ok' buttons). Once a name has been entered (e.g., 'Youtube scripts'), an entry appears at the top of the NS pop-up with the name entered and the word 'bundle'.
4. On subsequent visits to youtube.com, the bundle (e.g., 'Youtube scripts bundle') appears at the top of the NS pop-up. Clicking or hitting enter on the bundle allows the scripts from 'youtube.com' and 'ytimg.com'.
5. If the bundle has already been allowed on a previous or on the current visit, clicking or hitting enter on the bundle would deny execution of the scripts as included in the bundle.

This functionality, of course, would require some sort of editing facility. Firstly, I don't think that the inclusion or exclusion of a given script source should be done in the NS pop-up. While the user should be able to see what sources are cleared with a given bundle (an expansion pop-up could show what sources are cleared with the bundle), there should only be the ability to be taken to the NS Options... panel (see below) if one or more of the bundled sources are clicked or the focus is taken to the script source and 'Enter' hit.

As mentioned above, there would have to be some sort of bundle editing tab in the 'Options...' As a first stab at a 'Bundles' tab in the 'Options...' box, I would suggest the following layout:

Code: Select all

Bundles                                                          Script sources
-----------------------------------------------          -------------------------------------------------------
| Youtube scripts [youtube.com]               |         | youtube.com                                          |
| cnet [cnet.com]                             |         | ytimg.com                                            |
|                                             |         |                                                      |
-----------------------------------------------          -------------------------------------------------------
[  Add  ] [  Delete  ]                                   [______________________________] [  Add  ] [  Delete  ]
Functionality:
  • - Clicking on 'Add' under the 'Bundles' list shows a pop-up with text entry areas for 'Bundle Name' and 'Site' (and 'Cancel' and 'Enter' buttons). The entry areas would be for the name for the bundle and the full address, full domain or the base 2nd level domain for the site the bundle will become active with. Perhaps a help button (or something like that) would be necessary for this second text entry area saying that sites could be entered as full addresses, domain names or 2nd level domains.
  • - Clicking on a pre-existing bundle in the 'Bundle' list and clicking 'Delete' would remove the bundle and the script sources temporarily from the lists, and the bundle not showing up in the NS pop-up on the formerly bundled site.
  • - Entering a script source in the text entry area under the 'Script sources' list and hitting 'Add' will add the script source to the bundle which has focus (if any). If no bundle has the focus, a message indicating that a bundle has to be selected first should be displayed.
  • - Clicking a script source in the 'Script source' list would display the script source in the text area below the 'Script sources' list with the actions taken for the 'Add' and 'Delete' buttons being as follows:
    • - Modifying the text and hitting 'Add' would substitute the text entered for the former script source.
    • - Hitting 'Delete' would remove the script source from the bundle (see 'Design decisions' below).
Design decisions:
- Since bundles are only allowed to be created (according to the specifications above) when two or more script sources are temporarily allowed, if a bundle only has zero or one source attached to it after deletion of all the other sources, then should the bundle become inactive (perhaps the name becoming a lighter font color) or be automatically deleted when the user clicks 'OK'? If a bundle(s) becomes inactive when zero or one sources are attached to it, perhaps there should be a pop-up appear when the user clicks 'OK' asking if they want to delete the inactive bundles or preserve them. However, this leads to the question of whether this prompting should take place every time for all the inactive bundles when the user exits (through the 'OK' button), which could be annoying after a while, or the preservation/deletion of each inactive bundle could be determined by a checkbox next to each inactive bundle. If the inactive bundles hasn't changed from the last time, the checkbox selection of preserving/deleting inactive bundles doesn't have to appear. If the inactive bundles has changed, the previously preserved inactive bundles could be included with the new inactive bundles in the prompt.

Regardless, thanks for such a great plugin.

Cheers,
David

Re: [Enhancement] Site permission bundle

Posted: Fri Sep 16, 2011 4:57 am
by Tom T.
Sticky menus make it easier to temp-allow multiple script sources.
it's annoying to have to allow two scripts repeatedly for a given site,
If you are visiting the site repeatedly, is there a reason that its scripts are not in your whitelist, as the YouTube scripts you mention are in mine?

Your thoughtfulness is very much appreciated, but IMHO this is adding an enormous amount of complexity for something that the above two cover reasonably well. The final decision, of course, is NS developer Giorgio Maone's.

On behalf of Giorgio, the Mods, and the many who have contributed to NoScript, thank you for your kind words. :)

Re: [Enhancement] Site permission bundle

Posted: Fri Sep 16, 2011 2:55 pm
by therube
You may be able to set up particular associations, by allowing some secondary domains, & reducing their scope using ABE.

I was initially thinking of http://www.newegg.com/, which I do not whitelist.
Though you have to pretty much allow newegg.com (often prices will not display without) & you pretty much need to allow shockwave-flash@http://images10.newegg.com/ (in order for the extended screenshots to display without having to click the placeholder for every shot).

Had the images been on a different domain, say images10.newcdn.com & assuming that newcdn.com would not be used anywhere else other then on newegg.com, you could Allow newcdn.com, limit its' scope to only newegg.com (using ABE).

That way, when you visit newegg.com, newcdn.com would automatically be allowed. Newegg.com & newcdn.com would be "bundled".

(That's the idea. Not sure my specific example would work even if there were two domains like I described. I keep Flash blocked & Apply to whitelisted sites too. So what I really would want to Allow & reduce scope to only at newegg.com is shockwave-flash@http://images10.newegg.com/, but I don't think you can?)

Re: [Enhancement] Site permission bundle

Posted: Fri Sep 16, 2011 10:07 pm
by Tom T.
therube wrote: I was initially thinking of http://www.newegg.com/, which I do not whitelist.
Though you have to pretty much allow newegg.com (often prices will not display without) & you pretty much need to allow shockwave-flash@http://images10.newegg.com/ (in order for the extended screenshots to display without having to click the placeholder for every shot).
I don't whitelist newegg, either, but just temp-allowing the second-level domain newegg.com seems to allow everything needed.
IMHO, no Flash = better.
I still get the expanded screenshots, and forward/back arrows to view what would otherwise be a slideshow (I guess?), but at my own pace instead of theirs.

This is with Fx 3.6.22. SM may be different.