LINT fixes

This commit is contained in:
Fabio Manganiello 2020-07-07 01:40:18 +02:00
parent 6729f95a1e
commit 9befa9f05c

View file

@ -83,9 +83,10 @@ const app = {
switch (port.name) { switch (port.name) {
case 'action': case 'action':
port.onMessage.addListener(async message => { port.onMessage.addListener(async message => {
let ret = null;
switch (message.type) { switch (message.type) {
case 'run': case 'run':
const ret = await utils.methods.run(message.action, message.host); ret = await utils.methods.run(message.action, message.host);
port.postMessage(ret); port.postMessage(ret);
break; break;
} }
@ -118,9 +119,11 @@ const app = {
case 'dom': case 'dom':
port.onMessage.addListener(async message => { port.onMessage.addListener(async message => {
const tab = await utils.methods.getCurrentTab(); const tab = await utils.methods.getCurrentTab();
let dom = null;
switch (message.type) { switch (message.type) {
case 'get': case 'get':
const dom = await browser.tabs.sendMessage(tab.id, { type: 'getDOM' }, {}); dom = await browser.tabs.sendMessage(tab.id, { type: 'getDOM' }, {});
port.postMessage(dom); port.postMessage(dom);
break; break;
@ -169,9 +172,10 @@ const app = {
case 'mercury': case 'mercury':
port.onMessage.addListener(async message => { port.onMessage.addListener(async message => {
let response = null;
switch (message.type) { switch (message.type) {
case 'parse': case 'parse':
const response = await Mercury.parse(message.url, { response = await Mercury.parse(message.url, {
contentType: 'html', contentType: 'html',
html: message.html, html: message.html,
}); });