From 042347150e455e73641c2af8bdc1084d6605fc62 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sat, 25 Nov 2017 07:55:20 +0000 Subject: Use mkRepeatCommand in main.coffee. Tweak of #2601. --- background_scripts/main.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'background_scripts') diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index 4e36907a..75b9dbd5 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -114,7 +114,7 @@ TabOperations = canUseOpenerTabId = not (Utils.isFirefox() and Utils.compareVersions(Utils.firefoxVersion(), "57") < 0) tabConfig.openerTabId = request.tab.id if canUseOpenerTabId - chrome.tabs.create tabConfig, callback + chrome.tabs.create tabConfig, -> callback request # Opens request.url in new window and switches to it. openUrlInNewWindow: (request, callback = (->)) -> @@ -430,7 +430,7 @@ sendRequestHandlers = # getCurrentTabUrl is used by the content scripts to get their full URL, because window.location cannot help # with Chrome-specific URLs like "view-source:http:..". getCurrentTabUrl: ({tab}) -> tab.url - openUrlInNewTab: (request) -> TabOperations.openUrlInNewTab request + openUrlInNewTab: mkRepeatCommand (request, callback) -> TabOperations.openUrlInNewTab request, callback openUrlInNewWindow: (request) -> TabOperations.openUrlInNewWindow request openUrlInIncognito: (request) -> chrome.windows.create incognito: true, url: Utils.convertToUrl request.url openUrlInCurrentTab: TabOperations.openUrlInCurrentTab -- cgit v1.2.3