From 3bbca08833efc80d248fce1127044fa7135d293a Mon Sep 17 00:00:00 2001 From: Phil Crosby Date: Sun, 10 Jun 2012 01:37:03 -0700 Subject: Perform a google search if they hit enter with no selection. --- background_page.html | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'background_page.html') diff --git a/background_page.html b/background_page.html index ccd06044..bae23acb 100644 --- a/background_page.html +++ b/background_page.html @@ -222,32 +222,27 @@ }; } - /** + /* * Opens the url in the current tab. */ function openUrlInCurrentTab(request) { chrome.tabs.getSelected(null, function(tab) { - chrome.tabs.update(tab.id, {url: request.url}); + chrome.tabs.update(tab.id, { url: utils.convertToUrl(request.url) }); }); } - /** + /* * Opens request.url in new tab and switches to it if request.selected is true. - * */ function openUrlInNewTab(request) { chrome.tabs.getSelected(null, function(tab) { - chrome.tabs.create({ url: request.url, index: tab.index + 1, selected: true }); + chrome.tabs.create({ url: utils.convertToUrl(request.url), index: tab.index + 1, selected: true }); }); } - function openCopiedUrlInCurrentTab(request) { - openUrlInCurrentTab({ url: utils.ensureUrl(Clipboard.paste()) }); - } + function openCopiedUrlInCurrentTab(request) { openUrlInCurrentTab({ url: Clipboard.paste() }); } - function openCopiedUrlInNewTab(request) { - openUrlInNewTab({ url: utils.ensureUrl(Clipboard.paste()) }); - } + function openCopiedUrlInNewTab(request) { openUrlInNewTab({ url: Clipboard.paste() }); } /* * Returns the user-provided CSS overrides. -- cgit v1.2.3