diff options
author | emlow <dev@emlow.com> | 2018-04-01 16:16:29 +0100 |
---|---|---|
committer | emlow <dev@emlow.com> | 2018-04-01 16:16:29 +0100 |
commit | 21c28e668ef6fa6ca384f5bc67bcba1f22f26d57 (patch) | |
tree | 2d1516bd1e2cdc3f06031ca1853f72178d174124 /src/background | |
parent | 8dcb8f8c2212ac9b3b9d6fff02b47648f2a08fe5 (diff) |
shortcut to view page source
Diffstat (limited to 'src/background')
-rw-r--r-- | src/background/actions/operation.js | 5 |
1 files changed, 5 insertions, 0 deletions
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(); } |