Page 1 of 1

*EXTENDED* RFE: Copy menu items *including* Blocked Objects

Posted: Wed Jan 11, 2012 9:52 am
by Tom T.
AFAICT from the NoScript FAQ and NoScript "Features" Page, there is no way to copy one or more items in the NS Menu of allowed/blocked scripts. Sometimes it would be nice to be able to do this, especially for (cough) the Support Team (cough), who end up typing a lot of script names in responding to users: "Allow wxyz.abcdetwer.qwertyhjkl.com".

But also for many users posting here, surely. Or for those who want to copy a script source name for research in places other than the shift-click options.
E. g., I have sometimes looked up unknown sites in Wikipedia. Not suggesting to add WP to the experimental 3rd-party checklist; just one of many examples where it's easier to copy script names and paste them elsewhere. Here, WP, who knows?

The list of scripts can be quite lengthy, either on the allowed side or the denied or Untrusted side. PITA to have to type them all individually.

Right now, shift+click and l-click are used. R-clicking a script in NS menu seems to do nothing, so that's the suggestion: R-clicking a menu item copies it to the clipboard.

How to copy multiple items, or the whole menu, with one click instead of multiple copy/paste ops?
In Windows (XP, at least), any copy to the clipboard *overwrites* whatever was on the clipboard. So:

Maybe r-click on "Abut NoScript 2.2.5" could copy the entire menu?
Perhaps including sub-menus, too, as there's no convenient, unused "hook" (like "About NS") to use for sub-menus like Blocked Objects, Untrusted, and Recently Blocked Sites.

I've resorted to screenshots at times, when the lists were lengthy. But still can't copy/paste text from that.
Can use JSView to copy a script, but that gives the entire URI, like

Code: Select all

http://mail.yimg.com/zz/combo?/nq/mc/15_0_2/js/im_blue_all.js&/nq/mc/15_0_2/js/us_strings.js&/nq/mc/15_0_2/js/msgr.js
when all that's really wanted is mail.yimg.com. Copying from jsview and editing the result, especially for multiple items, is a lot of extra clicks and ops.

This REF can't be very difficult to implement, surely?

All in favor, say "Aye".
Any opposed?

Giorgio?

Re: RFE: Copy menu items

Posted: Sat Jan 14, 2012 12:04 am
by GµårÐïåñ
As long as it does not over complicate, introduce inconsistencies or force too much overhead for the program, then I am all for it. It might take some time to teach the users this interface addition but should not be rocket science, just a bit of habit forming. Also the interaction with the clipboard can and might be mitigated by other features, addons or security, so that might pose a condition in which it will not "always" work right, but as you said, not that difficult to implement, just making sure it stays consistent,that could take some doing. I know that Giorgio has been trying to not put too much load into the GUI and have avoided GUI intensive items, but a contextual copy like suggested should be just a bit of extra capture coding into the menu architecture, so not that complicated. However, different OS/platforms with varying GUI implementations could have inconsistencies, such as the menu items/icons on Linux vs. Mac vs. Windows, but again that's par for the course no matter what. Good request though, I'd go for it and can see usefulness of it for sure.

Re: RFE: Copy menu items

Posted: Sat Jan 14, 2012 2:14 am
by Tom T.
GµårÐïåñ wrote:... It might take some time to teach the users this interface addition...
Actually, *we'd* be the prime beneficiaries. :D

But how hard is "Right-click any item in the NS Menu to copy it"? :?

Thanks for the support.

Re: RFE: Copy menu items

Posted: Fri Jan 20, 2012 10:40 pm
by GµårÐïåñ
Tom T. wrote:Actually, *we'd* be the prime beneficiaries. :D
True I suppose, so maybe he can just bury it in the about:config as a setting and avoid the GUI option for it, we can flip it and the others can do it as needed or not.
But how hard is "Right-click any item in the NS Menu to copy it"? :?
Pseudocode and logically "speaking" not that hard, but there is actual coding involved which may or may not rely on existing libraries. If existing library, overhead is not much, simple code addition and we are off to the races. However, if not within existing library, means linking/importing/requiring a new set of libraries and that is overhead and of course the coding is par for the action regardless.

So I guess I would say, depends. From degree of difficulty and expertise required to do it, cake walk and he can do it in his sleep. Any difficulty would be in the addition of integration and linking of new code, that's all. Overall not a complex request, just not sure how that fits within his dev cycle, that's all I meant.
Thanks for the support.
Anytime, it was a good idea.

Re: RFE: Copy menu items

Posted: Sat Jan 21, 2012 4:11 am
by Tom T.
Thank you, my friend. I don't have anywhere near your experience in programming, but it seems intuitively that NoScript already knows the names of items in the menu, so wherever it reads them for display purposes, it sort of seems intuitive that those display names could be captured simply enough.

NS already recognizes left, middle, and shift+left clicks. Surely it can recognize a right-click, and attach it to the above capture?

I have a "Copy as Path" option in the context menu for any file or folder on the system. Clicking it copies the full file path to the Clipboard, which is a great shortcut in pasting locations, as in writing batch scripts etc. It requires only a 6k .exe that MS offers for free. Surely Giorgio can code this at least that easily, and knowing MS, probably in 600 bytes of js vs. 6,000 bytes of C+ or whatever. :mrgreen:

Re: [TODO] RFE: Copy menu items

Posted: Sun Jan 29, 2012 11:37 am
by Giorgio Maone
Completely missed this thread, sorry.
Put in my TODO list.

Re: [DONE] RFE: Copy menu items

Posted: Sat Feb 04, 2012 11:43 am
by Giorgio Maone
Please check latest development build 2.2.9rc2, thanks.

Re: [DONE] RFE: Copy menu items

Posted: Sat Feb 04, 2012 4:10 pm
by Alan Baxter
+ Right click on NoScript menu items copies the site to the clipboard, if
any under the pointer, or all the page-related script sources prepended
with a status mark: + for whitelisted, - for default, ! for untrusted (
thanks Tom T. for RFE)
Cool. Thank you.

Re: [DONE] RFE: Copy menu items

Posted: Sun Feb 05, 2012 1:48 pm
by therube
Any reason to be able to copy the 'Revoke Temporary Permissions' list?

Re: [DONE] RFE: Copy menu items

Posted: Sun Feb 05, 2012 2:41 pm
by Alan Baxter
therube wrote:Any reason to be able to copy the 'Revoke Temporary Permissions' list?
Could come in handy when helping another user. Then I could just paste the list of sites I had to TA into the support post. Thanks for the suggestion.

Re: [DONE] RFE: Copy menu items

Posted: Wed Feb 22, 2012 4:50 am
by Tom T.
@ Giorgio: Thanks for implementing. It's been a big help already.

Would it be too much trouble to add the ability to copy the "Blocked Objects" list, either individually, or the whole sub-menu? I don't seem to be able to do this now, or maybe I'm missing something.

Where this would really come in handy is in making ABE rules, e. g., to allow Yahoo Mail upload/download attachment objects (@ YMail only, of course).

TIA.