From 3c175e25651e116857f6ee64655a5c657157b174 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sun, 15 Mar 2015 04:22:22 +0000 Subject: Fill in "pages/blank.html" is an absolute URL. "pages/blank.html" was being sent to the default search engine by chrome.tabs.create(). Not fully functional. New tabs created from incognito mode are created in a non-incognito mode window. --- background_scripts/main.coffee | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/background_scripts/main.coffee b/background_scripts/main.coffee index b390fe1c..73e31c7e 100644 --- a/background_scripts/main.coffee +++ b/background_scripts/main.coffee @@ -245,7 +245,10 @@ moveTab = (callback, direction) -> # These are commands which are bound to keystroke which must be handled by the background page. They are # mapped in commands.coffee. BackgroundCommands = - createTab: (callback) -> openUrlInNewTab { url: Settings.get("newTabUrl") }, callback + createTab: (callback) -> + url = Settings.get "newTabUrl" + url = chrome.runtime.getURL url if url == "pages/blank.html" + openUrlInNewTab { url }, callback duplicateTab: (callback) -> chrome.tabs.getSelected(null, (tab) -> chrome.tabs.duplicate(tab.id) -- cgit v1.2.3