LINT fixes
This commit is contained in:
parent
6729f95a1e
commit
9befa9f05c
1 changed files with 7 additions and 3 deletions
|
@ -83,9 +83,10 @@ const app = {
|
|||
switch (port.name) {
|
||||
case 'action':
|
||||
port.onMessage.addListener(async message => {
|
||||
let ret = null;
|
||||
switch (message.type) {
|
||||
case 'run':
|
||||
const ret = await utils.methods.run(message.action, message.host);
|
||||
ret = await utils.methods.run(message.action, message.host);
|
||||
port.postMessage(ret);
|
||||
break;
|
||||
}
|
||||
|
@ -118,9 +119,11 @@ const app = {
|
|||
case 'dom':
|
||||
port.onMessage.addListener(async message => {
|
||||
const tab = await utils.methods.getCurrentTab();
|
||||
let dom = null;
|
||||
|
||||
switch (message.type) {
|
||||
case 'get':
|
||||
const dom = await browser.tabs.sendMessage(tab.id, { type: 'getDOM' }, {});
|
||||
dom = await browser.tabs.sendMessage(tab.id, { type: 'getDOM' }, {});
|
||||
port.postMessage(dom);
|
||||
break;
|
||||
|
||||
|
@ -169,9 +172,10 @@ const app = {
|
|||
|
||||
case 'mercury':
|
||||
port.onMessage.addListener(async message => {
|
||||
let response = null;
|
||||
switch (message.type) {
|
||||
case 'parse':
|
||||
const response = await Mercury.parse(message.url, {
|
||||
response = await Mercury.parse(message.url, {
|
||||
contentType: 'html',
|
||||
html: message.html,
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue