shortcut to view page source

This commit is contained in:
emlow 2018-04-01 16:16:29 +01:00
parent 8dcb8f8c22
commit 21c28e668e
4 changed files with 10 additions and 0 deletions

View file

@ -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();
}