aboutsummaryrefslogtreecommitdiffstats
path: root/background_page.html
diff options
context:
space:
mode:
authorJulian Naydichev2010-12-28 20:13:53 -0800
committerJulian Naydichev2010-12-28 20:13:53 -0800
commita59875bbfd8182c64f3e1673ec1546b751e462b5 (patch)
treeccb4554141e38df1bef2e7a82a01fdfa3fb4dc09 /background_page.html
parent1fd0a389ffe7460ac1c658227f0627c050153632 (diff)
downloadvimium-a59875bbfd8182c64f3e1673ec1546b751e462b5.tar.bz2
Made is so that viewing source opens in the next tab, instead of replacing the current tab.
Diffstat (limited to 'background_page.html')
-rw-r--r--background_page.html9
1 files changed, 9 insertions, 0 deletions
diff --git a/background_page.html b/background_page.html
index 264cf299..29dce3c7 100644
--- a/background_page.html
+++ b/background_page.html
@@ -70,6 +70,7 @@
var sendRequestHandlers = {
getCompletionKeys: getCompletionKeys,
getLinkHintCss: getLinkHintCss,
+ toggleViewSourceNewTab: toggleViewSourceNewTab,
openUrlInCurrentTab: openUrlInCurrentTab,
openOptionsPageInNewTab: openOptionsPageInNewTab,
registerFrame: registerFrame,
@@ -237,6 +238,14 @@
});
}
+ /** toggleViewSourceNewTab, opens source in new tab and switches to it
+ *
+ */
+ function toggleViewSourceNewTab(request) {
+ chrome.tabs.getSelected(null, function(tab) {
+ chrome.tabs.create({ url: request.url, index: tab.index + 1, selected: true });
+ });
+ }
/*
* Returns the core CSS used for link hints, along with any user-provided overrides.
*/