From 21c28e668ef6fa6ca384f5bc67bcba1f22f26d57 Mon Sep 17 00:00:00 2001 From: emlow Date: Sun, 1 Apr 2018 16:16:29 +0100 Subject: shortcut to view page source --- src/background/actions/operation.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/background/actions') diff --git a/src/background/actions/operation.js b/src/background/actions/operation.js index 56eb168..c477ce7 100644 --- a/src/background/actions/operation.js +++ b/src/background/actions/operation.js @@ -77,6 +77,11 @@ const exec = (operation, tab) => { return browser.tabs.sendMessage(tab.id, { type: messages.CONSOLE_HIDE, }); + case operations.PAGE_SOURCE: + return browser.tabs.create({ + url: 'view-source:' + tab.url, + index: tab.index + 1 + }); default: return Promise.resolve(); } -- cgit v1.2.3 From 740e123b36bab2a50282e73b0a20ec6863590f8f Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Sat, 5 May 2018 20:43:52 +0900 Subject: Use openerTabId for view-source --- src/background/actions/operation.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/background/actions') diff --git a/src/background/actions/operation.js b/src/background/actions/operation.js index c477ce7..10c366f 100644 --- a/src/background/actions/operation.js +++ b/src/background/actions/operation.js @@ -80,7 +80,8 @@ const exec = (operation, tab) => { case operations.PAGE_SOURCE: return browser.tabs.create({ url: 'view-source:' + tab.url, - index: tab.index + 1 + index: tab.index + 1, + openerTabId: tab.id, }); default: return Promise.resolve(); -- cgit v1.2.3