From f490b85757656c2276dcb9faa6237ca8231f8046 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sun, 11 Dec 2016 15:38:19 +0000 Subject: Use registryEntry.optionList. This means that we get the new tabs in the same order as they are specified in the key mapping. --- background_scripts/main.coffee | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'background_scripts') 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) -> -- cgit v1.2.3