aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts/marks.coffee
diff options
context:
space:
mode:
authorStephen Blott2015-06-25 12:16:51 +0100
committerStephen Blott2015-06-25 12:16:51 +0100
commitd9e8da958d55de5c8880b336255cf8987986be93 (patch)
tree4bdbb2e2a4a1a57428c180a25e4c4f3d3b5df4f8 /background_scripts/marks.coffee
parent9275c7a40cebb18e4c4593c9dd8a06ce655e2757 (diff)
downloadvimium-d9e8da958d55de5c8880b336255cf8987986be93.tar.bz2
Make global marks consistent with other tab creation operations.
This makes global marks use the same code for opening new tabs as other operations. Thus, the new tab appears in the same position as it would if it were created, for example, via the vomnibar. To do this properly, we move the three tab-creating functions into an object which can be (and is) exported (TabOperations). Also fixes these three operations such that they all take the same arguments; that is (request, callback). Not all of these callbacks are being used. But we should be consistent.
Diffstat (limited to 'background_scripts/marks.coffee')
-rw-r--r--background_scripts/marks.coffee2
1 files changed, 1 insertions, 1 deletions
diff --git a/background_scripts/marks.coffee b/background_scripts/marks.coffee
index 6e5f08ba..70ec1c17 100644
--- a/background_scripts/marks.coffee
+++ b/background_scripts/marks.coffee
@@ -82,7 +82,7 @@ Marks =
@gotoPositionInTab extend markInfo, tabId: tab.id
else
# There is no existing matching tab, we'll have to create one.
- chrome.tabs.create { url: @getBaseUrl markInfo.url }, (tab) =>
+ TabOperations.openUrlInNewTab { url: @getBaseUrl markInfo.url }, (tab) =>
# Note. tabLoadedHandlers is defined in "main.coffee". The handler below will be called when the tab
# is loaded, its DOM is ready and it registers with the background page.
tabLoadedHandlers[tab.id] = => @gotoPositionInTab extend markInfo, tabId: tab.id