Shortcut to "Reload" performs "Revoke Temporary Permissions"

Ask for help about NoScript, no registration needed to post
jolshefsky
Posts: 5
Joined: Mon Jun 23, 2014 3:14 pm
Location: Rochester, NY, U.S.
Contact:

Shortcut to "Reload" performs "Revoke Temporary Permissions"

Post by jolshefsky »

For what it's worth, I'm using Firefox 40.0.3 on OSX 10.6.8 with NoScript 2.6.9.36.

I find it facepalm-inducing that when I hover over the Permissions Menu, then check a few temporary permissions, then type Command-R to reload the page, NoScript instead revokes temporary permissions. Is there a way to remove that shortcut and allow Command-R to always execute a reload instead?

I'd add a survey if I could to see how many people actually use Command-R (Control-R on Windows?) to revoke permissions. I suspect it's not many, but who knows, so I can't say whether to make this default behavior. There is a noscript.keys.revokeTemp (string) option in Firefox's configuration but no clear answer as best I can tell.
May your deeds return to you tenfold,
---Jason Olshefsky
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:40.0) Gecko/20100101 Firefox/40.0
barbaz
Senior Member
Posts: 11104
Joined: Sat Aug 03, 2013 5:45 pm

Re: Shortcut to "Reload" performs "Revoke Temporary Permissi

Post by barbaz »

I think it's not related to noscript.keys.revokeTemp but rather that "R" is the access key of that menu item. So not Cmd-R but just the R that causes the undesired behavior?
I would think it easy to edit the XPI to not give that menu item an access key? (but I don't know how it's inserted...)
jolshefsky wrote:I'd add a survey if I could to see how many people actually use Command-R (Control-R on Windows?) to revoke permissions. I suspect it's not many, but who knows, so I can't say whether to make this default behavior. There is a noscript.keys.revokeTemp (string) option in Firefox's configuration but no clear answer as best I can tell.
I think most of us use the NoScript's own auto-reload feature + the sticky menu, configure the permissions & let the page reload when we close the menu by mouse-hover off (or click off, depending how the menu was opened). Well, I for one do.
*Always* check the changelogs BEFORE updating that important software!
-
barbaz
Senior Member
Posts: 11104
Joined: Sat Aug 03, 2013 5:45 pm

Re: Shortcut to "Reload" performs "Revoke Temporary Permissi

Post by barbaz »

barbaz wrote:I would think it easy to edit the XPI to not give that menu item an access key? (but I don't know how it's inserted...)
So to do this, we can disassemble the XPI, which is just a .zip file.
Looking at NoScript 2.6.9.37rc1, see what happens when you go to line 114 of noscriptOverlay.xul (in chrome/noscript.jar!/content/noscript) and delete this part of it? Image

Code: Select all

accesskey="&noscriptRevokeTemp.accesskey;"
You will also need to delete the META-INF folder or the resulting addon will not install due to mismatched signature.

Note that I have not actually tried out this modification, so I have no idea the result. Proceed at your own risk.
If you are at all unsure, completely shut down Firefox and back up your entire profile folder to an external disk before installing the modified NoScript to your browser.

That said, I may test this out later, but I don't know; just don't time for that now.

Anyway, to try out the modification: Repack the jar file exactly as it was (or let archive manager update it), repack the XPI (select all the items, compress as .zip - NOT in a subfolder - and change the extension), and install it in the browser by drag&drop.

If you do choose to try this, please let us know how it goes, thanks.
*Always* check the changelogs BEFORE updating that important software!
-
jolshefsky
Posts: 5
Joined: Mon Jun 23, 2014 3:14 pm
Location: Rochester, NY, U.S.
Contact:

Re: Shortcut to "Reload" performs "Revoke Temporary Permissi

Post by jolshefsky »

barbaz wrote:I think most of us use the NoScript's own auto-reload feature ...
I would except I get clumsy often enough where I miss a page I should add permissions for just as I'm closing the menu so I don't like to wait for a few-seconds reload to fix it. (Typically it's like "foobar.com" has a "fbcdn.net" and I finally mentally parse the CDN website just after I close the menu.)
barbaz wrote:Looking at NoScript 2.6.9.37rc1, see what happens when you go to line 114 of noscriptOverlay.xul (in chrome/noscript.jar!/content/noscript) and delete this part of it?
I appreciate the research but that's more complicated and risky than I'd like for what is merely an annoyance—one that a little more practice will build the habit to work around it.
May your deeds return to you tenfold,
---Jason Olshefsky
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:40.0) Gecko/20100101 Firefox/40.0
Post Reply