Keyconfig extension: FirefoxFrom MozillaZine Knowledge Base[edit] Firefox Functions[edit] Open LocationMenu: File -> Open Location user_pref("keyconfig.main.xxx_key__Open Location", "!][][][gBrowser.loadURI('http://www.mozilla.org/');");
[edit] ExtensionsMenu: Tools -> Extensions user_pref("keyconfig.main.xxx_key__Extensions", "!][][][BrowserOpenExtensions('extensions');");
[edit] ThemesMenu: Tools -> Themes user_pref("keyconfig.main.xxx_key__Themes", "!][][][BrowserOpenExtensions('themes');");
[edit] Bookmarks ManagerMenu: Bookmarks -> Manage Bookmarks user_pref("keyconfig.main.xxx_key__Manage Bookmarks", "!][][][toOpenWindowByType('bookmarks:manager', 'chrome://browser/content/bookmarks/bookmarksManager.xul');");
[edit] Next Tabuser_pref("keyconfig.main.xxx_key__Next Tab", "!][][][gBrowser.mTabContainer.advanceSelectedTab(1);");
[edit] Previous Tabuser_pref("keyconfig.main.xxx_key__Previous Tab", "!][][][gBrowser.mTabContainer.advanceSelectedTab(-1);");
[edit] Reload All Tabsuser_pref("keyconfig.main.xxx_key__Reload All Tabs", "!][][][gBrowser.reloadAllTabs();");
[edit] Close Tab and Focus to the left Tabuser_pref("keyconfig.main.xxx_key__Close Tab & Focus to the left", "!][][][var tab = gBrowser.mCurrentTab; if(tab.previousSibling) gBrowser.mTabContainer.selectedIndex--; gBrowser.removeTab(tab);");
[edit] Close Tab and Focus to the right Tabuser_pref("keyconfig.main.xxx_key__Close Tab & Focus to the right", "!][][][var tab = gBrowser.mCurrentTab; if(tab.nextSibling) gBrowser.mTabContainer.selectedIndex++; gBrowser.removeTab(tab);");
[edit] Close current Tabvar tab = gBrowser.mCurrentTab;
gBrowser.removeTab(tab);
[edit] Bookmark KeywordOpens the bookmark with the specified keyword. Replace the string KEYWORD with your bookmark's keyword. user_pref("keyconfig.main.xxx_key__Keyword 1", "!][][][if(window.loadURI) loadURI(getShortcutOrURI('KEYWORD',{}));");
[edit] Back MenuSimilar to the menu that appears when right-clicking the Back Button. If the menu is too low, decrease the 25 in the following line; if it is too high, increase it. user_pref("keyconfig.main.xxx_key__Back Menu", '!][][][var elm = document.getElementById("back-button"); var x = elm.boxObject.x; var y = elm.boxObject.y + elm.boxObject.height + 25; document.getElementById("backMenu").showPopup(elm, x, y, "popup", null, null);');
[edit] Forward MenuSimilar to the menu that appears when right-clicking the Forward Button. If the menu is too low, decrease the 25 in the following line; if it is too high, increase it. user_pref("keyconfig.main.xxx_key__Forward Menu", '!][][][var elm = document.getElementById("forward-button"); var x = elm.boxObject.x; var y = elm.boxObject.y + elm.boxObject.height + 25; document.getElementById("forwardMenu").showPopup(elm, x, y, "popup", null, null);');
[edit] Focus ContentActivate the selected content, as if you clicked on it. You need this, for example, if you want to scroll with the cursor keys and nothing happens. user_pref("keyconfig.main.xxx_key__Focus Content", "!][][][_content.focus();");
[edit] Paste and GoPaste URL from clipboard and automatically load the URL in current tab. user_pref("keyconfig.main.xxx_key__Paste and Go", "!][][][var paste = readFromClipboard();\nif(!paste) return;\nloadURI(paste);][chrome://browser/content/browser.xul");
[edit] Paste to New Tab and GoPaste URL from clipboard and automatically load the URL in a new tab. user_pref("keyconfig.main.xxx_key__Paste to New Tab and Go", "!][][][var paste = readFromClipboard();\nif(!paste) return;\ngBrowser.selectedTab = gBrowser.addTab(paste);][chrome://browser/content/browser.xul");
[edit] Scroll Page Downuser_pref("keyconfig.main.xxx_key__Page Down", "!][][][goDoCommand('cmd_scrollPageDown');");
[edit] Scroll Page Upuser_pref("keyconfig.main.xxx_key__Page Up", "!][][][goDoCommand('cmd_scrollPageUp');");
[edit] Scroll to the Bottomuser_pref("keyconfig.main.xxx_key__Scroll Bottom", "!][][][goDoCommand('cmd_scrollBottom');");
[edit] Scroll to the Topuser_pref("keyconfig.main.xxx_key__Scroll Top", "!][][][goDoCommand('cmd_scrollTop);");
[edit] Scroll Line Downuser_pref("keyconfig.main.xxx_key__Scroll Line Down", "!][][][goDoCommand('cmd_scrollLineDown);");
[edit] Scroll Line Upuser_pref("keyconfig.main.xxx_key__Scroll Line Up", "!][][][goDoCommand('cmd_scrollLineUp);");
[edit] Toggle Show/Hide Passworduser_pref("keyconfig.main.xxx_key__Toggle Show/Hide Password", "!][][][var passw = content.document.evaluate('//input[@type=\"password\"]',\n content.document, null, 6, null);\nif(passw.snapshotLength) {\n for(var i = 0; i < passw.snapshotLength; i++) {\n passw.snapshotItem(i).type = 'text';\n passw.snapshotItem(i).setAttribute('showPassword', true);\n }\n} else {\n passw = content.document.evaluate('//input[@showPassword=\"true\"]',\n content.document, null, 6, null);\n if(!passw.snapshotLength) return;\n for(var i = 0; i < passw.snapshotLength; i++) {\n passw.snapshotItem(i).type = 'password';\n passw.snapshotItem(i).removeAttribute('showPassword');\n }\n}][chrome://browser/content/browser.xul");
[edit] View Source in Current Tabuser_pref("keyconfig.main.xxx_key__View Source in Current Tab", "!][][][var sourceURL = 'view-source:' + content.document.location.href;\nloadURI(sourceURL);][chrome://browser/content/browser.xul");
[edit] View Source in New Tabuser_pref("keyconfig.main.xxx_key__View Source in New Tab", "!][][][var sourceURL = 'view-source:' + content.document.location.href;\ngBrowser.selectedTab = gBrowser.addTab(sourceURL);][chrome://browser/content/browser.xul");
[edit] View Source in Sidebaruser_pref("keyconfig.main.xxx_key__View Source in Sidebar", "!][][][var url = 'content.document.location.href;\nopenWebPanel(url, 'view-source:' + url);][chrome://browser/content/browser.xul");
[edit] Wrap Long LinesBased on Jesse Ruderman's Force Wrap bookmarklet user_pref("keyconfig.main.xxx_key__Wrap Long Lines", "!][][][var thisDoc = content.document;\n\nfunction F(n) {\n var u, r, c, x;\n if(n.nodeType == 3) {\n u = n.data.search(/\\S{45}/);\n if(u >= 0) {\n r = n.splitText(u + 45);\n n.parentNode.insertBefore(thisDoc.createElement('WBR'), r);\n }\n } else if(n.tagName != 'STYLE' && n.tagName != 'SCRIPT' && n.tagName != 'PRE') {\n for (c = 0; x = n.childNodes[c]; ++c) {\n F(x);\n }\n }\n}\n\nF(thisDoc.body);\nthisDoc.body.parentNode.insertBefore(thisDoc.body, thisDoc.body);][chrome://browser/content/browser.xul");
[edit] Zap ImagesBased on Jesse Ruderman's Zap Images bookmarklet user_pref("keyconfig.main.xxx_key__Wrap Long Lines", "!][][][var thisDoc = content.document;\n\nfunction F(n) {\n var u, r, c, x;\n if(n.nodeType == 3) {\n u = n.data.search(/\\S{45}/);\n if(u >= 0) {\n r = n.splitText(u + 45);\n n.parentNode.insertBefore(thisDoc.createElement('WBR'), r);\n }\n } else if(n.tagName != 'STYLE' && n.tagName != 'SCRIPT' && n.tagName != 'PRE') {\n for (c = 0; x = n.childNodes[c]; ++c) {\n F(x);\n }\n }\n}\n\nF(thisDoc.body);\nthisDoc.body.parentNode.insertBefore(thisDoc.body, thisDoc.body);][chrome://browser/content/browser.xul");
|