Try this:
Code: Select all
var type = "navigator:browser";
var enumerator = Services.wm.getEnumerator(type);
enumerator.getNext();
if (enumerator.hasMoreElements()) {
BrowserTryToCloseWindow();
}
Code: Select all
var type = "navigator:browser";
var enumerator = Services.wm.getEnumerator(type);
enumerator.getNext();
if (enumerator.hasMoreElements()) {
BrowserTryToCloseWindow();
}
avada wrote:Does anyone know how to start Adblock Plus Element hiding helper? It's hotkey is broken "null" and it's former hotkey is used I some web developer debugger stuff I never want to use, which keeps getting re-enabled no matter how many times I disable it.
I failed to find the command with dom inspector and such...
avada wrote:Does anyone know how to start Adblock Plus Element hiding helper?
Code: Select all
// simulate Ctrl+Shift+F3
var utils = document.commandDispatcher.focusedWindow.
QueryInterface(Components.interfaces.nsIInterfaceRequestor).
getInterface(Components.interfaces.nsIDOMWindowUtils);
utils.sendKeyEvent("keypress", KeyEvent.DOM_VK_F3, 0,
Event.CONTROL_MASK | Event.SHIFT_MASK);
Code: Select all
// ugly hack
setTimeout(function () {
document.getElementById("abp-toolbarbutton").open = true;
setTimeout(function () {
document.getElementsByClassName("elemhidehelper-item")[0].doCommand();
document.getElementById("abp-toolbarbutton").open = false;
}, 250);
}, 250);
morat wrote:Preference: extensions.elemhidehelper.selectelement_key
Hotkey Ctrl+Shift+F3 can be changed in the preference. Hotkey configuration will automatically ignore combinations that are already taken, specifying multiple options in the preference is possible.
Try these:
tonymec wrote:Some built-in hotkeys are snatched by the browser (or mailer) before keyconfig even has a chance to catch them; it depends on how the hotkey is accessed by the concerned routines. Hotkeys of this sort can never be disabled by keyconfig, which they bypass entirely.
JayhawksRock wrote:How about the Keyboard shortcuts like Ctrl-Shift-F3 and Ctrl-Shift-F
morat wrote:Try these:
Code: Select all
// simulate Ctrl+Shift+F3
var utils = document.commandDispatcher.focusedWindow.
QueryInterface(Components.interfaces.nsIInterfaceRequestor).
getInterface(Components.interfaces.nsIDOMWindowUtils);
utils.sendKeyEvent("keypress", KeyEvent.DOM_VK_F3, 0,
Event.CONTROL_MASK | Event.SHIFT_MASK);
Code: Select all
// simulate Ctrl+Shift+K
var utils = document.commandDispatcher.focusedWindow.
QueryInterface(Components.interfaces.nsIInterfaceRequestor).
getInterface(Components.interfaces.nsIDOMWindowUtils);
utils.sendKeyEvent("keypress", 0, KeyEvent.DOM_VK_K,
Event.CONTROL_MASK | Event.SHIFT_MASK);
Code: Select all
// simulate Ctrl+Shift+S
var utils = document.commandDispatcher.focusedWindow.
QueryInterface(Components.interfaces.nsIInterfaceRequestor).
getInterface(Components.interfaces.nsIDOMWindowUtils);
utils.sendKeyEvent("keypress", 0, KeyEvent.DOM_VK_S,
Event.CONTROL_MASK | Event.SHIFT_MASK);
Code: Select all
// simulate Ctrl+Shift+F3
var utils = document.commandDispatcher.focusedWindow.
QueryInterface(Components.interfaces.nsIInterfaceRequestor).
getInterface(Components.interfaces.nsIDOMWindowUtils);
utils.sendKeyEvent("keypress", KeyEvent.DOM_VK_F3, 0,
Event.CONTROL_MASK | Event.SHIFT_MASK);
Code: Select all
// simulate Alt+1
var utils = document.commandDispatcher.focusedWindow.
QueryInterface(Components.interfaces.nsIInterfaceRequestor).
getInterface(Components.interfaces.nsIDOMWindowUtils);
utils.sendKeyEvent("keypress", 0, KeyEvent.DOM_VK_1,
Event.ALT_MASK);
morat wrote:@avada
Preference: extensions.elemhidehelper.selectelement_key
Value: Accel Shift K, Accel Shift S, Accel Shift F3
Remember to restart the browser after modifying the preference.
Code: Select all
utils.sendKeyEvent("keypress", KeyEvent.DOM_VK_X, 0, Event.ALT_MASK)
Code: Select all
utils.sendKeyEvent("keypress", 0, KeyEvent.DOM_VK_X, Event.ALT_MASK)
Code: Select all
var curtab = document.getElementById("tabmail");
var tablen = curtab.tabInfo.length - 1;
var tabindex = curtab.tabContainer.selectedIndex;
tabindex == 0 ? tabindex = tablen : tabindex--;
curtab.switchToTab(tabindex);
Code: Select all
var curtab = document.getElementById("tabmail");
var tablen = curtab.tabInfo.length - 1;
var tabindex = curtab.tabContainer.selectedIndex;
tabindex == tablen ? tabindex = 0 : tabindex++;
curtab.switchToTab(tabindex);
Code: Select all
C-w close (needed for edit window)
x close
q quit
g page top
S-g page bottom
u page up
space page down
h scroll left
j scroll line up
k scroll line down
l scroll right
/ Find in message
n find Next
S-n find prev
S-k next tab
S-j prev tab
Code: Select all
o toggle offline
i fetch current account
f next message
S-f next unread
s next panel
d prev message
S-d prev unread
S-s prev panel
S-e Collapse all threads
e Expand all threads
m toggle message pane
r toggle Read
S-r Mark all read (in folder)
? focus global search box (must be visible)
b address Book
c Calendar
S-h back (message history)
S-l forward (message history)
F4 copy to clipboard all key_command operations for the installed Tbird version.
Code: Select all
user_pref("keyconfig.global.20110522", "");
user_pref("keyconfig.main.key_addressbook", "][B][");
user_pref("keyconfig.main.key_close", "control][W][");
user_pref("keyconfig.main.key_close2", "][X][");
user_pref("keyconfig.main.key_collapseAllThreads", "shift][E][");
user_pref("keyconfig.main.key_expandAllThreads", "][E][");
user_pref("keyconfig.main.key_find", "][/][");
user_pref("keyconfig.main.key_findAgain", "][N][");
user_pref("keyconfig.main.key_findPrev", "shift][N][");
user_pref("keyconfig.main.key_forward", "!][][");
user_pref("keyconfig.main.key_getNewMessages", "][I][");
user_pref("keyconfig.main.key_goBack", "shift][H][");
user_pref("keyconfig.main.key_goChat", "!][][");
user_pref("keyconfig.main.key_goForward", "shift][L][");
user_pref("keyconfig.main.key_goStartPage", "!][][");
user_pref("keyconfig.main.key_killSubthread", "!][][");
user_pref("keyconfig.main.key_killThread", "!][][");
user_pref("keyconfig.main.key_markAllRead", "shift][R][");
user_pref("keyconfig.main.key_markJunk", "!][][");
user_pref("keyconfig.main.key_markNotJunk", "!][][");
user_pref("keyconfig.main.key_markReadByDate", "!][][");
user_pref("keyconfig.main.key_markThreadAsRead", "!][][");
user_pref("keyconfig.main.key_nextUnreadMsg", "shift][F][");
user_pref("keyconfig.main.key_previousMsg", "][D][");
user_pref("keyconfig.main.key_previousUnreadMsg", "shift][D][");
user_pref("keyconfig.main.key_quickSearchFocus", "shift][?][");
user_pref("keyconfig.main.key_quit", "][Q][");
user_pref("keyconfig.main.key_toggleFlagged", "!][][");
user_pref("keyconfig.main.key_toggleMessagePane", "][M][");
user_pref("keyconfig.main.key_toggleRead", "][R][");
user_pref("keyconfig.main.key_watchThread", "!][][");
user_pref("keyconfig.main.openLightningKey", "][C][");
user_pref("keyconfig.main.xxx_key_Commands2Clipboard", "][][VK_F4][// copy list of commands to clipboard\n// some commands are only legal when there is a selection\n// or when the focus is anywhere where you can type text\nvar commands = document.getElementsByTagName(\"command\");\nvar out = new Array();\nvar info = Components.classes[\"@mozilla.org/xre/app-info;1\"].\n getService(Components.interfaces.nsIXULAppInfo);\nvar type = document.documentElement.getAttribute(\"windowtype\");\nout.push(info.name + \" \" + info.version, \"\", type, \"\");\nfor (var i = 0; i < commands.length; i++) {\n var id = commands[i].getAttribute(\"id\");\n var oncommand = commands[i].getAttribute(\"oncommand\");\n if (id && oncommand) out.push(id);\n}\nvar req = new XMLHttpRequest();\nreq.open(\"GET\", \"chrome://global/content/platformHTMLBindings.xml\", false);\nreq.send(null);\nvar doc = req.responseXML;\nvar handlers = doc.getElementsByTagName(\"handler\");\nfor (var i = 0; i < handlers.length; i++) {\n var command = handlers[i].getAttribute(\"command\");\n if (command && out.indexOf(command) == -1) out.push(command);\n}\nvar clipboard = Components.classes[\"@mozilla.org/widget/clipboardhelper;1\"].\n getService(Components.interfaces.nsIClipboardHelper);\nif (navigator.platform.indexOf(\"Win\")) {\n clipboard.copyString(out.join(\"\\n\"));\n} else {\n clipboard.copyString(out.join(\"\\r\\n\"));\n}\nalert(\"done\");][chrome://messenger/content/messenger.xul");
user_pref("keyconfig.main.xxx_key_NextPanel", "][S][][SwitchPaneFocus(event);][chrome://messenger/content/messenger.xul");
user_pref("keyconfig.main.xxx_key_NextTab", "shift][K][][var curtab = document.getElementById(\"tabmail\");\nvar tablen = curtab.tabInfo.length - 1;\nvar tabindex = curtab.tabContainer.selectedIndex;\ntabindex == tablen ? tabindex = 0 : tabindex++;\ncurtab.switchToTab(tabindex);][");
user_pref("keyconfig.main.xxx_key_PageDown", "!][][][goDoCommand('cmd_scrollPageDown');");
user_pref("keyconfig.main.xxx_key_PageUp", "][U][][goDoCommand('cmd_scrollPageUp');");
user_pref("keyconfig.main.xxx_key_PrevPanel", "shift][S][][SwitchPaneFocus(event);][chrome://messenger/content/messenger.xul");
user_pref("keyconfig.main.xxx_key_PrevTab", "shift][J][][var curtab = document.getElementById(\"tabmail\");\nvar tablen = curtab.tabInfo.length - 1;\nvar tabindex = curtab.tabContainer.selectedIndex;\ntabindex == 0 ? tabindex = tablen : tabindex--;\ncurtab.switchToTab(tabindex);][");
user_pref("keyconfig.main.xxx_key_ScrollBottom", "shift][G][][goDoCommand('cmd_scrollBottom');");
user_pref("keyconfig.main.xxx_key_ScrollLeft", "][H][][goDoCommand('cmd_scrollLeft');");
user_pref("keyconfig.main.xxx_key_ScrollLineDown", "][J][][goDoCommand('cmd_scrollLineDown');");
user_pref("keyconfig.main.xxx_key_ScrollLineUp", "][K][][goDoCommand('cmd_scrollLineUp');");
user_pref("keyconfig.main.xxx_key_ScrollRight", "][L][][goDoCommand('cmd_scrollRight');");
user_pref("keyconfig.main.xxx_key_ScrollTop", "][G][][goDoCommand('cmd_scrollTop');");
user_pref("keyconfig.main.xxx_key_SwitchPaneFocus(event);", "!][][");
user_pref("keyconfig.main.xxx_key_toggleOffline", "][O][][MailOfflineMgr.toggleOfflineStatus()][chrome://messenger/content/messenger.xul");