Keyconfig extension: Firefox: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
 
(35 intermediate revisions by 19 users not shown)
Line 1: Line 1:
==Firefox General==
==Firefox Functions==
{|
|'''Extensions'''
|-
|''Menu:'' Tools > Extensions
|-
|<pre>user_pref("keyconfig.main.xxx_key__Extensions", "!][][][BrowserOpenExtensions('extensions');");</pre>
|-
|'''Themes'''
|-
|''Menu:'' Tools > Themes
|-
|<pre>user_pref("keyconfig.main.xxx_key__Themes", "!][][][BrowserOpenExtensions('themes');");</pre>
|-
|'''Bookmarks Manager'''
|-
|''Menu:'' Bookmarks > Manage Bookmarks
|-
|<pre>user_pref("keyconfig.main.xxx_key__Manage Bookmarks", "!][][][toOpenWindowByType('bookmarks:manager', 'chrome://browser/content/bookmarks/bookmarksManager.xul');");</pre>
|-
|'''Next Tab'''
|-
|<pre>user_pref("keyconfig.main.xxx_key__Next Tab", "!][][][gBrowser.mTabContainer.advanceSelectedTab(1);");</pre>
|-
|'''Previous Tab'''
|-
|<pre>user_pref("keyconfig.main.xxx_key__Previous Tab", "!][][][gBrowser.mTabContainer.advanceSelectedTab(-1);");</pre>
|-
|'''Reload All Tabs'''
|-
|<pre>user_pref("keyconfig.main.xxx_key__Reload All Tabs", "!][][][gBrowser.reloadAllTabs();");</pre>
|-
|'''Close Tab and Focus to the left Tab'''
|-
|<pre>user_pref("keyconfig.main.xxx_key__Close Tab & Focus to the left", "!][][][var tab = gBrowser.mCurrentTab; if(tab.previousSibling) gBrowser.mTabContainer.selectedIndex--; gBrowser.removeTab(tab);");</pre>
|-
|'''Close Tab and Focus to the right Tab'''
|-
|<pre>user_pref("keyconfig.main.xxx_key__Close Tab & Focus to the right", "!][][][var tab = gBrowser.mCurrentTab; if(tab.nextSibling) gBrowser.mTabContainer.selectedIndex++; gBrowser.removeTab(tab);"); </pre>
|-
|'''Bookmark Keyword'''
|-
|Opens the bookmark with the specified keyword. Replace the string KEYWORD with your bookmark's keyword.
|-
|<pre>user_pref("keyconfig.main.xxx_key__Keyword 1", "!][][][if(window.loadURI) loadURI(getShortcutOrURI('KEYWORD',{}));");</pre>
|-
|'''Back Menu'''
|-
|Like 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.
|-
|<pre>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);');</pre>
|-
|'''Forward Menu'''
|-
|Like 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.
|-
|<pre>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);');</pre>
|-
|'''Focus Content'''
|-
|Activate the content, where the page is showed, as if you would click on it. You need this for example if you want to scroll with the cursor keys and nothing happens.
|-
|<pre>user_pref("keyconfig.main.xxx_key__Focus Content", "!][][][_content.focus();");</pre>
|-
|'''Scroll Page Down'''
|-
|<pre>user_pref("keyconfig.main.xxx_key__Page Down", "!][][][goDoCommand('cmd_scrollPageDown');");</pre>
|-
|'''Scroll Page Up'''
|-
|<pre>user_pref("keyconfig.main.xxx_key__Page Up", "!][][][goDoCommand('cmd_scrollPageUp');");</pre>
|-
|'''Scroll to the Bottom'''
|-
|<pre>user_pref("keyconfig.main.xxx_key__Scroll Bottom", "!][][][goDoCommand('cmd_scrollBottom');");</pre>
|-
|'''Scroll to the Top'''
|-
|<pre>user_pref("keyconfig.main.xxx_key__Scroll Top", "!][][][goDoCommand('cmd_scrollTop);");</pre>
|}


===Open Location===
''Menu:'' File -> Open Location


==Extensions==
<div style="font-family: monospace; font-size: small; border: 1px dashed #2f6fab; color: black; padding: 1em; background-color: #f9f9f9; line-height: 1.5em; margin-bottom: 2em;">user_pref("keyconfig.main.xxx_key__Open Location", "!][][][gBrowser.loadURI('http://www.mozilla.org/');");</div>
===Googlebar===
{|
|'''Clear search history'''
|-
|Googlebar Button > Clear search history
|-
|<pre>user_pref("keyconfig.main.xxx_key__Googlebar - Clear search history", "!][][][googlebarClearHistory( true )");</pre>
|-
|'''Up a directory'''
|-
|Like pressing the button "Up a directory"
|-
|<pre>user_pref("keyconfig.main.xxx_key__Googlebar - Up a directory", "!][][][googlebarUp(event)");</pre>
|-
|'''Up a directory (Popup Menu)'''
|-
|Opens the popup menu of the button "Up a directory"
|-
|<pre>user_pref("keyconfig.main.xxx_key__Googlebar - Up a directory (Popup Menu)", '!][][][var elm = document.getElementById("up-dir-popup"); var x = elm.boxObject.x; var y = elm.boxObject.y + elm.boxObject.height + 25; document.getElementById("up-dir-popup").showPopup(elm, x, y, "popup", null, null);');</pre>
|-
|'''Highlight search terms (Toggle):'''
|-
|<pre>user_pref("keyconfig.main.xxx_key__Googlebar - Highlight search terms (Toggle)", "!][][][googlebarHighLightInPage()");</pre>
|}


===Extensions===
''Menu:'' Tools -> Extensions


===Menu Editor===
<div style="font-family: monospace; font-size: small; border: 1px dashed #2f6fab; color: black; padding: 1em; background-color: #f9f9f9; line-height: 1.5em; margin-bottom: 2em;">user_pref("keyconfig.main.xxx_key__Extensions", "!][][][BrowserOpenExtensions('extensions');");</div>
{|
|'''Open Preferences for Menu Editor'''
|-
|''Menu:'' Tools > Extensions > Menu Editor > Options
|-
|<pre>user_pref("keyconfig.main.xxx_key__Menu Editor", "!][][][openDialog('chrome://menuedit/content/menueditprefs.xul',, 'resizable');");</pre>
|}


===Themes===
''Menu:'' Tools -> Themes


===miniT or Tab Mix===
<div style="font-family: monospace; font-size: small; border: 1px dashed #2f6fab; color: black; padding: 1em; background-color: #f9f9f9; line-height: 1.5em; margin-bottom: 2em;">user_pref("keyconfig.main.xxx_key__Themes", "!][][][BrowserOpenExtensions('themes');");</div>
{|
|'''Move Tab to the end of the tab bar'''
|-
|<pre>user_pref("keyconfig.main.xxx_key__Move Tab -> End", "!][][][gBrowser.moveTabTo(gBrowser.mCurrentTab,gBrowser.mTabContainer.childNodes.length-1);");</pre>
|-
|'''Move Tab to the left'''
|-
|<pre>user_pref("keyconfig.main.xxx_key__Move Tab -> Left", "!][][][if(gBrowser.mCurrentTab.previousSibling) gBrowser.moveTabTo(gBrowser.mCurrentTab,gBrowser.mCurrentTab.ordinal-1);");</pre>
|-
|'''Move Tab to the right'''
|-
|<pre>user_pref("keyconfig.main.xxx_key__Move Tab -> Right", "!][][][if(gBrowser.mCurrentTab.nextSibling) gBrowser.moveTabTo(gBrowser.mCurrentTab,gBrowser.mCurrentTab.ordinal+1);");</pre>
|-
|'''Move Tab to the start of the tab bar'''
|-
|<pre>user_pref("keyconfig.main.xxx_key__Move Tab -> Start", "!][][][gBrowser.moveTabTo(gBrowser.mCurrentTab,0);");</pre>
|}


===Bookmarks Manager===
''Menu:'' Bookmarks -> Manage Bookmarks


===Enhanced Bookmark Search===
<div style="font-family: monospace; font-size: small; border: 1px dashed #2f6fab; color: black; padding: 1em; background-color: #f9f9f9; line-height: 1.5em; margin-bottom: 2em;">user_pref("keyconfig.main.xxx_key__Manage Bookmarks", "!][][][toOpenWindowByType('bookmarks:manager', 'chrome://browser/content/bookmarks/bookmarksManager.xul');");</div>
{|
|'''Search Bookmarks'''
|-
|''Menu:'' Bookmarks > Search Bookmarks
|-
|<pre>user_pref("keyconfig.main.xxx_key__Search Bookmarks", "!][][][window.openDialog('chrome://bcpm/content/findBookmark.xul', 'FindBookmarksWindow', 'dialog=no,centerscreen,resizable=no,chrome,dependent');");</pre>
|}


===Next Tab===
<div style="font-family: monospace; font-size: small; border: 1px dashed #2f6fab; color: black; padding: 1em; background-color: #f9f9f9; line-height: 1.5em; margin-bottom: 2em;">user_pref("keyconfig.main.xxx_key__Next Tab", "!][][][gBrowser.mTabContainer.advanceSelectedTab(1);");</div>


===SessionSaver===
===Previous Tab===
{|
<div style="font-family: monospace; font-size: small; border: 1px dashed #2f6fab; color: black; padding: 1em; background-color: #f9f9f9; line-height: 1.5em; margin-bottom: 2em;">user_pref("keyconfig.main.xxx_key__Previous Tab", "!][][][gBrowser.mTabContainer.advanceSelectedTab(-1);");</div>
|'''Capture Default Session'''
|-
|''Menu:'' File > Capture
|-
|<pre>user_pref("keyconfig.main.xxx_key__SessionSaver - Capture Default Session", "!][][][SessionSaver.hiddenObserver.observe(null, 'SessionSaver-CaptureAll', null);");</pre>
|-
|'''Restore Default Session'''
|-
|''Menu:'' File > Restore Session
|-
|<pre>user_pref("keyconfig.main.xxx_key__SessionSaver - Restore Default Session", "!][][][SessionSaver.sessionRecall(null, SessionSaver.prefBranchStatic + SessionSaver.staticBranchDefault)");</pre>
|-
|'''Capture New Session'''
|-
|''Menu:'' Tools > SessionSaver > New
|-
|<pre>user_pref("keyconfig.main.xxx_key__SessionSaver - Capture New Session", "!][][][SessionSaver.sessionPrompt();");</pre>
|}


===Reload All Tabs===
<div style="font-family: monospace; font-size: small; border: 1px dashed #2f6fab; color: black; padding: 1em; background-color: #f9f9f9; line-height: 1.5em; margin-bottom: 2em;">user_pref("keyconfig.main.xxx_key__Reload All Tabs", "!][][][gBrowser.reloadAllTabs();");</div>


===Show Anchors===
===Close Tab and Focus to the left Tab===
{|
<div style="font-family: monospace; font-size: small; border: 1px dashed #2f6fab; color: black; padding: 1em; background-color: #f9f9f9; line-height: 1.5em; margin-bottom: 2em;">user_pref("keyconfig.main.xxx_key__Close Tab & Focus to the left", "!][][][var tab = gBrowser.mCurrentTab; if(tab.previousSibling) gBrowser.mTabContainer.selectedIndex--; gBrowser.removeTab(tab);");</div>
|'''Show Anchors (Toggle)'''
|-
|Like right-clicking and selecting "Show Anchors"
|-
|<pre>user_pref("keyconfig.main.xxx_key__Show Anchors Toggle"", "!][][][Objshowanchors.change();");</pre>
|}


===Close Tab and Focus to the right Tab===
<div style="font-family: monospace; font-size: small; border: 1px dashed #2f6fab; color: black; padding: 1em; background-color: #f9f9f9; line-height: 1.5em; margin-bottom: 2em;">user_pref("keyconfig.main.xxx_key__Close Tab & Focus to the right", "!][][][var tab = gBrowser.mCurrentTab; if(tab.nextSibling) gBrowser.mTabContainer.selectedIndex++; gBrowser.removeTab(tab);"); </div>


===Undoclosetab enhanced===
===Close current Tab===
{|
<div style="font-family: monospace; font-size: small; border: 1px dashed #2f6fab; color: black; padding: 1em; background-color: #f9f9f9; line-height: 1.5em; margin-bottom: 2em;">var tab = gBrowser.mCurrentTab;
|'''Retrieve closed tabs (Popup Menu)'''
gBrowser.removeTab(tab);</div>
|-
 
|Like clicking on the button "Retrieve tabs that you've closed". The button must be visible.
===Bookmark Keyword===
|-
Opens the bookmark with the specified keyword. Replace the string KEYWORD with your bookmark's keyword.
|<pre>user_pref("keyconfig.main.xxx_key__Undoclosetab enh. - Retrieve closed tabs (Popup Menu)", '!][][][var elm = document.getElementById("undoclose-popup"); var x = elm.boxObject.x; var y = elm.boxObject.y + elm.boxObject.height + 25; document.getElementById("undoclose-popup").showPopup(elm, x, y, "popup", null, null);');</pre>
 
  |}
<div style="font-family: monospace; font-size: small; border: 1px dashed #2f6fab; color: black; padding: 1em; background-color: #f9f9f9; line-height: 1.5em; margin-bottom: 2em;">user_pref("keyconfig.main.xxx_key__Keyword 1", "!][][][if(window.loadURI) loadURI(getShortcutOrURI('KEYWORD',{}));");</div>
 
===Back Menu===
Similar 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.
 
<div style="font-family: monospace; font-size: small; border: 1px dashed #2f6fab; color: black; padding: 1em; background-color: #f9f9f9; line-height: 1.5em; margin-bottom: 2em;">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);');</div>
 
===Forward Menu===
Similar 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.
 
<div style="font-family: monospace; font-size: small; border: 1px dashed #2f6fab; color: black; padding: 1em; background-color: #f9f9f9; line-height: 1.5em; margin-bottom: 2em;">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);');</div>
 
===Focus Content===
Activate 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.
 
<div style="font-family: monospace; font-size: small; border: 1px dashed #2f6fab; color: black; padding: 1em; background-color: #f9f9f9; line-height: 1.5em; margin-bottom: 2em;">user_pref("keyconfig.main.xxx_key__Focus Content", "!][][][_content.focus();");</div>
 
===Paste and Go===
Paste URL from clipboard and automatically load the URL in current tab.
<div style="font-family: monospace; font-size: small; border: 1px dashed #2f6fab; color: black; padding: 1em; background-color: #f9f9f9; line-height: 1.5em; margin-bottom: 2em;">user_pref("keyconfig.main.xxx_key__Paste and Go", "!][][][var paste = readFromClipboard();\nif(!paste) return;\nloadURI(paste);][chrome://browser/content/browser.xul");</div>
 
===Paste to New Tab and Go===
Paste URL from clipboard and automatically load the URL in a new tab.
<div style="font-family: monospace; font-size: small; border: 1px dashed #2f6fab; color: black; padding: 1em; background-color: #f9f9f9; line-height: 1.5em; margin-bottom: 2em;">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");</div>
 
===Scroll Page Down===
<div style="font-family: monospace; font-size: small; border: 1px dashed #2f6fab; color: black; padding: 1em; background-color: #f9f9f9; line-height: 1.5em; margin-bottom: 2em;">user_pref("keyconfig.main.xxx_key__Page Down", "!][][][goDoCommand('cmd_scrollPageDown');");</div>
 
===Scroll Page Up===
<div style="font-family: monospace; font-size: small; border: 1px dashed #2f6fab; color: black; padding: 1em; background-color: #f9f9f9; line-height: 1.5em; margin-bottom: 2em;">user_pref("keyconfig.main.xxx_key__Page Up", "!][][][goDoCommand('cmd_scrollPageUp');");</div>
 
===Scroll to the Bottom===
<div style="font-family: monospace; font-size: small; border: 1px dashed #2f6fab; color: black; padding: 1em; background-color: #f9f9f9; line-height: 1.5em; margin-bottom: 2em;">user_pref("keyconfig.main.xxx_key__Scroll Bottom", "!][][][goDoCommand('cmd_scrollBottom');");</div>
 
===Scroll to the Top===
<div style="font-family: monospace; font-size: small; border: 1px dashed #2f6fab; color: black; padding: 1em; background-color: #f9f9f9; line-height: 1.5em; margin-bottom: 2em;">user_pref("keyconfig.main.xxx_key__Scroll Top", "!][][][goDoCommand('cmd_scrollTop);");</div>
 
===Scroll Line Down===
<div style="font-family: monospace; font-size: small; border: 1px dashed #2f6fab; color: black; padding: 1em; background-color: #f9f9f9; line-height: 1.5em; margin-bottom: 2em;">user_pref("keyconfig.main.xxx_key__Scroll Line Down", "!][][][goDoCommand('cmd_scrollLineDown);");</div>
 
===Scroll Line Up===
<div style="font-family: monospace; font-size: small; border: 1px dashed #2f6fab; color: black; padding: 1em; background-color: #f9f9f9; line-height: 1.5em; margin-bottom: 2em;">user_pref("keyconfig.main.xxx_key__Scroll Line Up", "!][][][goDoCommand('cmd_scrollLineUp);");</div>
 
===Toggle Show/Hide Password===
<div style="font-family: monospace; font-size: small; border: 1px dashed #2f6fab; color: black; padding: 1em; background-color: #f9f9f9; line-height: 1.5em; margin-bottom: 2em;">user_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");</div>
 
===View Source in Current Tab===
<div style="font-family: monospace; font-size: small; border: 1px dashed #2f6fab; color: black; padding: 1em; background-color: #f9f9f9; line-height: 1.5em; margin-bottom: 2em;">user_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");</div>
 
===View Source in New Tab===
<div style="font-family: monospace; font-size: small; border: 1px dashed #2f6fab; color: black; padding: 1em; background-color: #f9f9f9; line-height: 1.5em; margin-bottom: 2em;">user_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");</div>
 
===View Source in Sidebar===
<div style="font-family: monospace; font-size: small; border: 1px dashed #2f6fab; color: black; padding: 1em; background-color: #f9f9f9; line-height: 1.5em; margin-bottom: 2em;">user_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");</div>
 
===Wrap Long Lines===
Based on [http://www.squarefree.com/ Jesse Ruderman]'s [http://www.squarefree.com/bookmarklets/zap.html#force_wrap Force Wrap] [http://www.squarefree.com/bookmarklets/ bookmarklet]
 
<div style="font-family: monospace; font-size: small; border: 1px dashed #2f6fab; color: black; padding: 1em; background-color: #f9f9f9; line-height: 1.5em; margin-bottom: 2em;">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' &amp;&amp; n.tagName != 'SCRIPT' &amp;&amp; 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");</div>
 
===Zap Images===
Based on [http://www.squarefree.com/ Jesse Ruderman]'s [http://www.squarefree.com/bookmarklets/zap.html#zap_images Zap Images] [http://www.squarefree.com/bookmarklets/ bookmarklet]
 
<div style="font-family: monospace; font-size: small; border: 1px dashed #2f6fab; color: black; padding: 1em; background-color: #f9f9f9; line-height: 1.5em; margin-bottom: 2em;">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");</div>
 
[[Category: Keyboard and mouse (Firefox)]]
[[Category: Extensions (Firefox)]]

Latest revision as of 05:06, 12 March 2006

Firefox Functions

Open Location

Menu: File -> Open Location

user_pref("keyconfig.main.xxx_key__Open Location", "!][][][gBrowser.loadURI('http://www.mozilla.org/');");

Extensions

Menu: Tools -> Extensions

user_pref("keyconfig.main.xxx_key__Extensions", "!][][][BrowserOpenExtensions('extensions');");

Themes

Menu: Tools -> Themes

user_pref("keyconfig.main.xxx_key__Themes", "!][][][BrowserOpenExtensions('themes');");

Bookmarks Manager

Menu: Bookmarks -> Manage Bookmarks

user_pref("keyconfig.main.xxx_key__Manage Bookmarks", "!][][][toOpenWindowByType('bookmarks:manager', 'chrome://browser/content/bookmarks/bookmarksManager.xul');");

Next Tab

user_pref("keyconfig.main.xxx_key__Next Tab", "!][][][gBrowser.mTabContainer.advanceSelectedTab(1);");

Previous Tab

user_pref("keyconfig.main.xxx_key__Previous Tab", "!][][][gBrowser.mTabContainer.advanceSelectedTab(-1);");

Reload All Tabs

user_pref("keyconfig.main.xxx_key__Reload All Tabs", "!][][][gBrowser.reloadAllTabs();");

Close Tab and Focus to the left Tab

user_pref("keyconfig.main.xxx_key__Close Tab & Focus to the left", "!][][][var tab = gBrowser.mCurrentTab; if(tab.previousSibling) gBrowser.mTabContainer.selectedIndex--; gBrowser.removeTab(tab);");

Close Tab and Focus to the right Tab

user_pref("keyconfig.main.xxx_key__Close Tab & Focus to the right", "!][][][var tab = gBrowser.mCurrentTab; if(tab.nextSibling) gBrowser.mTabContainer.selectedIndex++; gBrowser.removeTab(tab);");

Close current Tab

var tab = gBrowser.mCurrentTab; gBrowser.removeTab(tab);

Bookmark Keyword

Opens 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',{}));");

Back Menu

Similar 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);');

Forward Menu

Similar 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);');

Focus Content

Activate 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();");

Paste and Go

Paste 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");

Paste to New Tab and Go

Paste 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");

Scroll Page Down

user_pref("keyconfig.main.xxx_key__Page Down", "!][][][goDoCommand('cmd_scrollPageDown');");

Scroll Page Up

user_pref("keyconfig.main.xxx_key__Page Up", "!][][][goDoCommand('cmd_scrollPageUp');");

Scroll to the Bottom

user_pref("keyconfig.main.xxx_key__Scroll Bottom", "!][][][goDoCommand('cmd_scrollBottom');");

Scroll to the Top

user_pref("keyconfig.main.xxx_key__Scroll Top", "!][][][goDoCommand('cmd_scrollTop);");

Scroll Line Down

user_pref("keyconfig.main.xxx_key__Scroll Line Down", "!][][][goDoCommand('cmd_scrollLineDown);");

Scroll Line Up

user_pref("keyconfig.main.xxx_key__Scroll Line Up", "!][][][goDoCommand('cmd_scrollLineUp);");

Toggle Show/Hide Password

user_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");

View Source in Current Tab

user_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");

View Source in New Tab

user_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");

View Source in Sidebar

user_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");

Wrap Long Lines

Based 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");

Zap Images

Based 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");