aboutsummaryrefslogtreecommitdiffstats
path: root/background_page.html
diff options
context:
space:
mode:
authorjez2011-01-01 19:41:48 +0800
committerjez2011-01-01 19:41:48 +0800
commit31e45b04e0b78baadaa13ccdf061d6ce3441f375 (patch)
treea9fe2abaa57ac933cb2147fac2fa46cb45f62e28 /background_page.html
parent067619766715f5aca7554a818a475419fc665e63 (diff)
parentfdc320339e8cbdf978fe2259f247eec2e182a65f (diff)
downloadvimium-31e45b04e0b78baadaa13ccdf061d6ce3441f375.tar.bz2
Merge remote branch 'origin/master' into filter-hints
Diffstat (limited to 'background_page.html')
-rw-r--r--background_page.html10
1 files changed, 10 insertions, 0 deletions
diff --git a/background_page.html b/background_page.html
index ff25610b..106db28d 100644
--- a/background_page.html
+++ b/background_page.html
@@ -71,6 +71,7 @@
var sendRequestHandlers = {
getCompletionKeys: getCompletionKeys,
getLinkHintCss: getLinkHintCss,
+ openUrlInNewTab: openUrlInNewTab,
openUrlInCurrentTab: openUrlInCurrentTab,
openOptionsPageInNewTab: openOptionsPageInNewTab,
registerFrame: registerFrame,
@@ -238,6 +239,15 @@
});
}
+ /**
+ * 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: request.selected });
+ });
+ }
/*
* Returns the core CSS used for link hints, along with any user-provided overrides.
*/