aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--background_page.html9
-rw-r--r--manifest.json2
-rw-r--r--vimiumFrontend.js2
3 files changed, 11 insertions, 2 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.
*/
diff --git a/manifest.json b/manifest.json
index 0459a80b..ccac450a 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,6 +1,6 @@
{
"name": "Vimium",
- "version": "1.21",
+ "version": "1.22.1",
"description": "The Hacker's Browser. Vimium provides keyboard shortcuts for navigation and control in the spirit of Vim.",
"icons": { "16": "icons/icon16.png",
"48": "icons/icon48.png",
diff --git a/vimiumFrontend.js b/vimiumFrontend.js
index a18c7966..c7701cab 100644
--- a/vimiumFrontend.js
+++ b/vimiumFrontend.js
@@ -304,7 +304,7 @@ function toggleViewSourceCallback(url) {
url = url.substr(12, url.length - 12);
}
else { url = "view-source:" + url; }
- chrome.extension.sendRequest({handler: "openUrlInCurrentTab", url:url});
+ chrome.extension.sendRequest({handler: "toggleViewSourceNewTab", url:url});
}
/**