aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2016-03-09 16:29:16 +0000
committerStephen Blott2016-03-09 16:29:16 +0000
commite4127fc8f779a5c784332e65b1322180c4381dd0 (patch)
tree9af8bff3e4471799e4d52ee66d0310e7da8c1cca
parente102c5e526e6257a5ea8add54c0aa9efad2961b8 (diff)
downloadvimium-e4127fc8f779a5c784332e65b1322180c4381dd0.tar.bz2
Fix mainFrame command...
Oversight from #2022.
-rw-r--r--background_scripts/commands.coffee2
-rw-r--r--background_scripts/main.coffee4
-rw-r--r--content_scripts/vimium_frontend.coffee4
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:")