aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Blott2015-03-15 04:22:22 +0000
committerStephen Blott2015-03-15 15:46:51 +0000
commit3c175e25651e116857f6ee64655a5c657157b174 (patch)
treef52a4939abe5a7ae3819ab9e3ad56a918ce42333
parente5a2355b91313a50318d4500cfb077dadb20134e (diff)
downloadvimium-3c175e25651e116857f6ee64655a5c657157b174.tar.bz2
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.
-rw-r--r--background_scripts/main.coffee5
1 files changed, 4 insertions, 1 deletions
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)