aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts
diff options
context:
space:
mode:
authorStephen Blott2016-12-11 15:38:19 +0000
committerStephen Blott2016-12-11 15:38:22 +0000
commitf490b85757656c2276dcb9faa6237ca8231f8046 (patch)
tree3a8cb7243c7d49d78b94aafed4e01bd388960d9b /background_scripts
parentd142f4c4c75eceb92184c0773f4d7b376870accf (diff)
downloadvimium-f490b85757656c2276dcb9faa6237ca8231f8046.tar.bz2
Use registryEntry.optionList.
This means that we get the new tabs in the same order as they are specified in the key mapping.
Diffstat (limited to 'background_scripts')
-rw-r--r--background_scripts/main.coffee10
1 files changed, 5 insertions, 5 deletions
diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee
index 14d93101..283826de 100644
--- a/background_scripts/main.coffee
+++ b/background_scripts/main.coffee
@@ -152,18 +152,18 @@ BackgroundCommands =
[request.url]
else
# Otherwise, if we have a registryEntry containing URLs, then use them.
- urlList = (opt for own opt of request.registryEntry?.options ? {} when Utils.isUrl opt)
+ urlList = (opt for opt in request.registryEntry.optionList when Utils.isUrl opt)
if 0 < urlList.length
urlList
else
# Otherwise, just create a new tab.
- url = Settings.get "newTabUrl"
- if url == "pages/blank.html"
+ newTabUrl = Settings.get "newTabUrl"
+ if newTabUrl == "pages/blank.html"
# "pages/blank.html" does not work in incognito mode, so fall back to "chrome://newtab" instead.
[if request.tab.incognito then "chrome://newtab" else chrome.runtime.getURL newTabUrl]
else
- [url]
- urls = request.urls[..]
+ [newTabUrl]
+ urls = request.urls[..].reverse()
do openNextUrl = (request) ->
if 0 < urls.length
TabOperations.openUrlInNewTab (extend request, {url: urls.pop()}), (tab) ->