Skip to content

Commit 6785fe9

Browse files
committed
chg: Use manfest v3
1 parent c394758 commit 6785fe9

File tree

6 files changed

+93
-3433
lines changed

6 files changed

+93
-3433
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,12 @@ And then you can run the app in development mode with:
3737

3838
```bash
3939
web-ext run
40+
# or if it doesn't work
41+
MOZ_ENABLE_WAYLAND=1 TMPDIR=~/tmp npx web-ext run
4042
```
4143

44+
45+
4246
The best ressources for learning how to write and contribute to extensions
4347
are on the [extension website](https://extensionworkshop.com/).
48+

background_script.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function handleClick() {
44
browser.runtime.openOptionsPage();
55
}
66

7-
browser.browserAction.onClicked.addListener(handleClick);
7+
browser.action.onClicked.addListener(handleClick);
88

99

1010
browser.runtime.onInstalled.addListener(async ({ reason, temporary }) => {

browserAction/script.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,12 @@ async function onGot(tabs){
77

88
const config = await browser.storage.local.get().then(res => res);
99

10-
const referrer = await browser.tabs.executeScript(tab.id, {
11-
code: 'document.referrer'
10+
const referrer = await browser.scripting.executeScript({
11+
target: {
12+
tabId: tab.id,
13+
allFrames: true,
14+
},
15+
func: () => { return document.referrer },
1216
}).then(result => result[0]);
1317

1418
let cookies = []

manifest.json

+7-9
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
"background_script.js"
66
]
77
},
8-
"browser_action": {
9-
"browser_style": true,
8+
"action": {
109
"default_icon": {
1110
"64": "icons/icon.png"
1211
},
@@ -16,7 +15,7 @@
1615
"browser_specific_settings": {
1716
"gecko": {
1817
19-
"strict_min_version": "120.0"
18+
"strict_min_version": "127.0"
2019
}
2120
},
2221
"description": "Submit the URL of the current tab to a lookyloo instance for capture.",
@@ -28,20 +27,19 @@
2827
"icons": {
2928
"64": "icons/icon.png"
3029
},
31-
"manifest_version": 2,
30+
"manifest_version": 3,
3231
"name": "lookyloo",
3332
"optional_permissions": [
3433
"cookies"
3534
],
3635
"options_ui": {
3736
"page": "options/index.html",
38-
"browser_style": true,
3937
"chrome_style": true
4038
},
4139
"permissions": [
42-
"activeTab",
43-
"<all_urls>",
44-
"storage"
40+
"activeTab",
41+
"storage",
42+
"scripting"
4543
],
46-
"version": "0.0.3"
44+
"version": "0.1.0"
4745
}

0 commit comments

Comments
 (0)