FireGestures and NoScript

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

FireGestures and NoScript

Post by Guest »

Hi,
I'm trying to toggle on and off NoScript for a website with a mouse gesture, but I can't get it to work.
I want to know the name of the command of the keyboard shortcut, I tried "noscript.keys.toggle" but that doesn't seem to work.
Mozilla/5.0 (Windows; U; Windows NT 5.1; es-AR; rv:1.9.1) Gecko/20090624 Firefox/3.5
Grumpy Old Lady
Senior Member
Posts: 240
Joined: Fri Jul 03, 2009 7:20 am

Re: FireGestures and NoScript

Post by Grumpy Old Lady »

Hi,
If you mean toggle "temporarily allow" the combo is CTRL SHFT backslash.
A user can't toggle NS itself on the fly. It has to be turned off in the Addons Manager dialog.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2
Guest

Re: FireGestures and NoScript

Post by Guest »

Thanks.
There was probably an easier way, but this is what I came up with, in case someone needs it in the future.

var evt = document.createEvent("KeyEvents");
evt.initKeyEvent(
"keypress",
true,
true,
null,
true, // holds Ctrl key
false, // holds Alt key
true, // holds Shift key
false, // holds Meta key
evt.DOM_VK_BACK_SLASH, // presses a special key, @see http://mxr.mozilla.org/mozilla/source/d ... yEvent.idl
0 // presses a normal key, e.g. "A".charCodeAt(0),
);
document.documentElement.dispatchEvent(evt);
Mozilla/5.0 (Windows; U; Windows NT 5.1; es-AR; rv:1.9.1) Gecko/20090624 Firefox/3.5
Guest

Re: FireGestures and NoScript

Post by Guest »

I recently switched to Firegestures from AIO Gestures just to see if FG could map a gesture for NoScript. Thanks to you, it can! Thank you so much, this has been annoying me for a long time!
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0
Post Reply