Skip to content

Commit

Permalink
Overlay <key>s to close, on all of our dialogs.
Browse files Browse the repository at this point in the history
  • Loading branch information
arantius committed May 25, 2010
1 parent 4f36de9 commit 45ae0b4
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
6 changes: 5 additions & 1 deletion chrome.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ content greasemonkey content/
skin greasemonkey classic/1.0 skin/

overlay chrome://browser/content/browser.xul chrome://greasemonkey/content/browser.xul
overlay chrome://songbird/content/xul/mainScriptsOverlay.xul chrome://greasemonkey/content/browser.xul
overlay chrome://songbird/content/xul/mainScriptsOverlay.xul chrome://greasemonkey/content/browser.xul
overlay chrome://mozapps/content/extensions/extensions.xul chrome://greasemonkey/content/addons.xul

overlay chrome://greasemonkey/content/install.xul chrome://greasemonkey/content/closewindow.xul
overlay chrome://greasemonkey/content/options.xul chrome://greasemonkey/content/closewindow.xul
overlay chrome://greasemonkey/content/newscript.xul chrome://greasemonkey/content/closewindow.xul

style chrome://greasemonkey/content/addons.xul chrome://greasemonkey/skin/addons-mac.css os=Darwin

locale greasemonkey en-US locale/en-US/
14 changes: 14 additions & 0 deletions content/closewindow.xul
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<overlay id="greasemonkey-close-window-overlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

<commandset>
<command id="cmd_close" oncommand="window.close();" />
</commandset>

<keyset>
<key command="cmd_close" key="w" modifiers="accel" />
<key command="cmd_close" keycode="VK_ESCAPE" />
</keyset>

</overlay>

1 comment on commit 45ae0b4

@erikvold
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chrome://greasemonkey/content/install.xul needs to do more than just window.close() when the user presses ctrl+w

Please sign in to comment.