diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2018-05-05 18:39:56 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-05 18:39:56 +0900 |
commit | 828ac8cd84ddae9565be67f56e452a416b305c7a (patch) | |
tree | bd616058e11f1bb3228c2a52bd3bc8e02d3ac149 /src/background/actions | |
parent | e68c0b0f8002207c32c2e8d387b17f5f4f2ccae9 (diff) | |
parent | 912231500439306f4d822e4fdc1764a7c68c5da2 (diff) |
Merge pull request #368 from emlow/issue-279
Add shortcut to view page source
Diffstat (limited to 'src/background/actions')
-rw-r--r-- | src/background/actions/operation.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/background/actions/operation.js b/src/background/actions/operation.js index 56eb168..10c366f 100644 --- a/src/background/actions/operation.js +++ b/src/background/actions/operation.js @@ -77,6 +77,12 @@ 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, + openerTabId: tab.id, + }); default: return Promise.resolve(); } |