diff options
author | Hsieh Chin Fan <pham@topo.tw> | 2024-10-27 17:34:33 +0800 |
---|---|---|
committer | Hsieh Chin Fan <pham@topo.tw> | 2024-10-27 17:34:33 +0800 |
commit | c9ad4f2e2e813ab8f8d623d1fbd05de076766906 (patch) | |
tree | b9a7041eb735e3e7550cdab552822844611e9808 | |
parent | ec7fd1c039fbac510e15abea8c5628ef76b2bfb2 (diff) |
style: standardjs
-rw-r--r-- | addon/background.js | 4 | ||||
-rw-r--r-- | addon/index.mjs | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/addon/background.js b/addon/background.js index 058f875..ac742ab 100644 --- a/addon/background.js +++ b/addon/background.js | |||
@@ -1,3 +1,5 @@ | |||
1 | /* global browser */ | ||
2 | |||
1 | browser.contextMenus.create( | 3 | browser.contextMenus.create( |
2 | { | 4 | { |
3 | id: 'map-inline-add', | 5 | id: 'map-inline-add', |
@@ -12,7 +14,7 @@ browser.contextMenus.create( | |||
12 | title: 'Open in DumbyMap', | 14 | title: 'Open in DumbyMap', |
13 | contexts: ['page', 'selection'], | 15 | contexts: ['page', 'selection'], |
14 | }, | 16 | }, |
15 | () => void browser.runtime.lastError, | 17 | () => browser.runtime.lastError, |
16 | ) | 18 | ) |
17 | 19 | ||
18 | browser.contextMenus.onClicked.addListener((info, tab) => { | 20 | browser.contextMenus.onClicked.addListener((info, tab) => { |
diff --git a/addon/index.mjs b/addon/index.mjs index 70d23c4..cd3a15e 100644 --- a/addon/index.mjs +++ b/addon/index.mjs | |||
@@ -1,3 +1,5 @@ | |||
1 | /* global browser */ | ||
2 | /* eslint-disable-next-line no-console */ | ||
1 | console.log('content script loaded') | 3 | console.log('content script loaded') |
2 | 4 | ||
3 | const url = new URL(window.location) | 5 | const url = new URL(window.location) |
@@ -34,6 +36,7 @@ const simpleRender = window.mapclay.renderWith(config => ({ | |||
34 | })) | 36 | })) |
35 | 37 | ||
36 | browser.runtime.onMessage.addListener((message, sender, sendResponse) => { | 38 | browser.runtime.onMessage.addListener((message, sender, sendResponse) => { |
39 | /* eslint-disable-next-line no-console */ | ||
37 | console.log('receive message', message) | 40 | console.log('receive message', message) |
38 | sendResponse('received') | 41 | sendResponse('received') |
39 | if (message === 'map-inline-add') { | 42 | if (message === 'map-inline-add') { |