From b782ecae479bac9fe3d587bf1bdcaf51aca143af Mon Sep 17 00:00:00 2001 From: jez Date: Wed, 29 Dec 2010 18:08:43 +0800 Subject: Object-ify linkHints.js --- commands.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'commands.js') diff --git a/commands.js b/commands.js index c86b129f..1518f113 100644 --- a/commands.js +++ b/commands.js @@ -110,9 +110,9 @@ function clearKeyMappingsAndSetDefaults() { mapKeyToCommand('gi', 'focusInput'); - mapKeyToCommand('f', 'activateLinkHintsMode'); - mapKeyToCommand('F', 'activateLinkHintsModeToOpenInNewTab'); - mapKeyToCommand('', 'activateLinkHintsModeWithQueue'); + mapKeyToCommand('f', 'linkHints.activateLinkHintsMode'); + mapKeyToCommand('F', 'linkHints.activateLinkHintsModeToOpenInNewTab'); + mapKeyToCommand('', 'linkHints.activateLinkHintsModeWithQueue'); mapKeyToCommand('/', 'enterFindMode'); mapKeyToCommand('n', 'performFind'); @@ -157,9 +157,9 @@ addCommand('enterInsertMode', 'Enter insert mode'); addCommand('focusInput', 'Focus the first (or n-th) text box on the page', false, true); -addCommand('activateLinkHintsMode', 'Enter link hints mode to open links in current tab'); -addCommand('activateLinkHintsModeToOpenInNewTab', 'Enter link hints mode to open links in new tab'); -addCommand('activateLinkHintsModeWithQueue', 'Enter link hints mode to open multiple links in a new tab'); +addCommand('linkHints.activateLinkHintsMode', 'Enter link hints mode to open links in current tab'); +addCommand('linkHints.activateLinkHintsModeToOpenInNewTab', 'Enter link hints mode to open links in new tab'); +addCommand('linkHints.activateLinkHintsModeWithQueue', 'Enter link hints mode to open multiple links in a new tab'); addCommand('enterFindMode', 'Enter find mode'); addCommand('performFind', 'Cycle forward to the next find match'); -- cgit v1.2.3 From 70833b4c132d444e128a8c497d0e30fc03d325d7 Mon Sep 17 00:00:00 2001 From: jez Date: Fri, 31 Dec 2010 12:33:43 +0800 Subject: Shorten linkHint variables where possible. --- commands.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'commands.js') diff --git a/commands.js b/commands.js index e4cef0c2..ec35c569 100644 --- a/commands.js +++ b/commands.js @@ -110,9 +110,9 @@ function clearKeyMappingsAndSetDefaults() { mapKeyToCommand('gi', 'focusInput'); - mapKeyToCommand('f', 'linkHints.activateLinkHintsMode'); - mapKeyToCommand('F', 'linkHints.activateLinkHintsModeToOpenInNewTab'); - mapKeyToCommand('', 'linkHints.activateLinkHintsModeWithQueue'); + mapKeyToCommand('f', 'linkHints.activateMode'); + mapKeyToCommand('F', 'linkHints.activateModeToOpenInNewTab'); + mapKeyToCommand('', 'linkHints.activateModeWithQueue'); mapKeyToCommand('/', 'enterFindMode'); mapKeyToCommand('n', 'performFind'); @@ -157,9 +157,9 @@ addCommand('enterInsertMode', 'Enter insert mode'); addCommand('focusInput', 'Focus the first (or n-th) text box on the page', false, true); -addCommand('linkHints.activateLinkHintsMode', 'Enter link hints mode to open links in current tab'); -addCommand('linkHints.activateLinkHintsModeToOpenInNewTab', 'Enter link hints mode to open links in new tab'); -addCommand('linkHints.activateLinkHintsModeWithQueue', 'Enter link hints mode to open multiple links in a new tab'); +addCommand('linkHints.activateMode', 'Enter link hints mode to open links in current tab'); +addCommand('linkHints.activateModeToOpenInNewTab', 'Enter link hints mode to open links in new tab'); +addCommand('linkHints.activateModeWithQueue', 'Enter link hints mode to open multiple links in a new tab'); addCommand('enterFindMode', 'Enter find mode'); addCommand('performFind', 'Cycle forward to the next find match'); @@ -191,7 +191,7 @@ var commandGroups = { "scrollPageUp", "scrollFullPageUp", "scrollFullPageDown", "reload", "toggleViewSource", "zoomIn", "zoomOut", "copyCurrentUrl", "goUp", "enterInsertMode", "focusInput", - "activateLinkHintsMode", "activateLinkHintsModeToOpenInNewTab", "activateLinkHintsModeWithQueue", + "linkHints.activateMode", "linkHints.activateModeToOpenInNewTab", "linkHints.activateModeWithQueue", "enterFindMode", "performFind", "performBackwardsFind", "nextFrame"], historyNavigation: ["goBack", "goForward"], -- cgit v1.2.3 From ca5c5350f75df115531dba22bf497fbf230f5bbe Mon Sep 17 00:00:00 2001 From: jez Date: Mon, 31 Jan 2011 15:23:02 +0800 Subject: Fix up the invocation of linkHints.* commands --- commands.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'commands.js') diff --git a/commands.js b/commands.js index de70a0a9..7c0f4a9d 100644 --- a/commands.js +++ b/commands.js @@ -124,9 +124,9 @@ function clearKeyMappingsAndSetDefaults() { "gi": "focusInput", - "f": "activateLinkHintsMode", - "F": "activateLinkHintsModeToOpenInNewTab", - "": "activateLinkHintsModeWithQueue", + "f": "linkHints.activateMode", + "F": "linkHints.activateModeToOpenInNewTab", + "": "linkHints.activateModeWithQueue", "/": "enterFindMode", "n": "performFind", @@ -182,9 +182,9 @@ var commandDescriptions = { focusInput: ["Focus the first (or n-th) text box on the page", { passCountToFunction: true }], - activateLinkHintsMode: ["Open a link in the current tab"], - activateLinkHintsModeToOpenInNewTab: ["Open a link in a new tab"], - activateLinkHintsModeWithQueue: ["Open multiple links in a new tab"], + 'linkHints.activateMode': ["Open a link in the current tab"], + 'linkHints.activateModeToOpenInNewTab': ["Open a link in a new tab"], + 'linkHints.activateModeWithQueue': ["Open multiple links in a new tab"], enterFindMode: ["Enter find mode"], performFind: ["Cycle forward to the next find match"], @@ -223,7 +223,7 @@ var commandGroups = { "scrollPageUp", "scrollFullPageUp", "scrollFullPageDown", "reload", "toggleViewSource", "zoomIn", "zoomOut", "zoomReset", "copyCurrentUrl", "goUp", "enterInsertMode", "focusInput", - "activateLinkHintsMode", "activateLinkHintsModeToOpenInNewTab", "activateLinkHintsModeWithQueue", + "linkHints.activateMode", "linkHints.activateModeToOpenInNewTab", "linkHints.activateModeWithQueue", "goPrevious", "goNext", "nextFrame"], findCommands: ["enterFindMode", "performFind", "performBackwardsFind"], historyNavigation: @@ -239,5 +239,5 @@ var commandGroups = { // from Vimium will uncover these gems. var advancedCommands = [ "scrollToLeft", "scrollToRight", - "zoomReset", "goUp", "focusInput", "activateLinkHintsModeWithQueue", - "goPrevious", "goNext"]; \ No newline at end of file + "zoomReset", "goUp", "focusInput", "linkHints.activateModeWithQueue", + "goPrevious", "goNext"]; -- cgit v1.2.3 From d31aa9fefc26f562f45043ad184846c469a580a9 Mon Sep 17 00:00:00 2001 From: jez Date: Tue, 1 Feb 2011 02:03:12 +0800 Subject: Tidy up merge --- commands.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'commands.js') diff --git a/commands.js b/commands.js index 7c0f4a9d..b5d0a359 100644 --- a/commands.js +++ b/commands.js @@ -146,6 +146,9 @@ function clearKeyMappingsAndSetDefaults() { "x": "removeTab", "X": "restoreTab", + "b": "activateBookmarkFindMode", + "B": "activateBookmarkFindModeToOpenInNewTab", + "gf": "nextFrame" }; @@ -207,6 +210,9 @@ var commandDescriptions = { removeTab: ["Close current tab", { background: true }], restoreTab: ["Restore closed tab", { background: true }], + activateBookmarkFindMode: ["Open a bookmark in the current tab"], + activateBookmarkFindModeToOpenInNewTab: ["Open a bookmark in a new tab"], + nextFrame: ["Cycle forward to the next frame on the page", { background: true }] }; -- cgit v1.2.3