diff options
| -rw-r--r-- | background_scripts/commands.coffee | 2 | ||||
| -rw-r--r-- | background_scripts/main.coffee | 4 | ||||
| -rw-r--r-- | content_scripts/vimium_frontend.coffee | 4 |
3 files changed, 4 insertions, 6 deletions
diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee index 55cb60d2..2e597e32 100644 --- a/background_scripts/commands.coffee +++ b/background_scripts/commands.coffee @@ -385,7 +385,7 @@ commandDescriptions = "Vomnibar.activateEditUrlInNewTab": ["Edit the current URL and open in a new tab", { topFrame: true }] nextFrame: ["Cycle forward to the next frame on the page", { background: true, passCountToFunction: true }] - mainFrame: ["Select the tab's main/top frame", { background: true, noRepeat: true }] + mainFrame: ["Select the tab's main/top frame", { topFrame: true, noRepeat: true }] "Marks.activateCreateMode": ["Create a new mark", { noRepeat: true }] "Marks.activateGotoMode": ["Go to a mark", { noRepeat: true }] diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 49199cae..81a694d0 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -288,10 +288,6 @@ BackgroundCommands = chrome.tabs.getSelected null, (tab) -> frameIdsForTab[tab.id] = cycleToFrame frameIdsForTab[tab.id], frameId, count chrome.tabs.sendMessage tab.id, name: "focusFrame", frameId: frameIdsForTab[tab.id][0], highlight: true - mainFrame: -> - chrome.tabs.getSelected null, (tab) -> - # The front end interprets a frameId of 0 to mean the main/top from. - chrome.tabs.sendMessage tab.id, name: "focusFrame", frameId: 0, highlight: true closeTabsOnLeft: -> removeTabsRelative "before" closeTabsOnRight: -> removeTabsRelative "after" diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index 1a882192..037d01d3 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -314,9 +314,11 @@ extend window, urlsplit = urlsplit.slice(0, Math.max(3, urlsplit.length - count)) window.location.href = urlsplit.join('/') - goToRoot: () -> + goToRoot: -> window.location.href = window.location.origin + mainFrame: -> focusThisFrame highlight: true + toggleViewSource: -> chrome.runtime.sendMessage { handler: "getCurrentTabUrl" }, (url) -> if (url.substr(0, 12) == "view-source:") |
