From 9b57efe67dd9f16ab30886182b6591b589c29bbf Mon Sep 17 00:00:00 2001 From: Einar Egilsson Date: Fri, 26 Aug 2011 16:55:21 +0200 Subject: Added close button + alt+r shortcut to toggle enabled --- chrome/code/browserOverlay.xul.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'chrome/code/browserOverlay.xul.js') diff --git a/chrome/code/browserOverlay.xul.js b/chrome/code/browserOverlay.xul.js index 0d2f46e..d4df3b9 100644 --- a/chrome/code/browserOverlay.xul.js +++ b/chrome/code/browserOverlay.xul.js @@ -17,6 +17,11 @@ var RedirectorOverlay = { this.prefs = new RedirectorPrefs(); this.changedPrefs(this.prefs); this.prefs.addListener(this); + document.addEventListener('keypress', function(event) { + if ((event.charCode == 114) && event.altKey) { //alt+r + RedirectorOverlay.toggleEnabled(); + } + }, true); } catch(e) { if (this.strings) { alert(this.strings.getString("initError") + "\n\n" + e); -- cgit v1.2.3-70-g09d2