Skip to content
This repository was archived by the owner on Dec 1, 2023. It is now read-only.

Commit 6f0298b

Browse files
authored
Merge pull request #34 from eclipse439/master
Update Edge Extension Tutorials to use Manifest V3
2 parents 807c75a + 438b81e commit 6f0298b

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "NASA Picture of the day viewer",
33
"version": "0.0.0.1",
4-
"manifest_version": 2,
4+
"manifest_version": 3,
55
"description": "A chromium extension to show NASA's Picture of the Day.",
66
"icons": {
77
"16": "icons/nasapod16x16.png",
88
"32": "icons/nasapod32x32.png",
99
"48": "icons/nasapod48x48.png",
1010
"128": "icons/nasapod128x128.png"
1111
},
12-
"browser_action": {
12+
"action": {
1313
"default_popup": "popup/popup.html"
1414
}
1515
}

extension-getting-started-part2/extension-getting-started-part2/manifest.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"name": "NASA Picture of the day viewer",
33
"version": "0.0.0.1",
4-
"manifest_version": 2,
4+
"manifest_version": 3,
55
"description": "A chromium extension to show NASA's Picture of the Day.",
66
"icons": {
77
"16": "icons/nasapod16x16.png",
88
"32": "icons/nasapod32x32.png",
99
"48": "icons/nasapod48x48.png",
1010
"128": "icons/nasapod128x128.png"
1111
},
12-
"browser_action": {
12+
"action": {
1313
"default_popup": "popup/popup.html"
1414
},
1515
"content_scripts": [
@@ -21,6 +21,9 @@
2121
}
2222
],
2323
"web_accessible_resources": [
24-
"images/*.jpeg"
24+
{
25+
"resources": ["images/*.jpeg"],
26+
"matches": ["<all_urls>"]
27+
}
2528
]
2629
}

extension-getting-started-part2/extension-getting-started-part2/popup/popup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ if (sendMessageId) {
55
chrome.tabs.sendMessage(
66
tabs[0].id,
77
{
8-
url: chrome.extension.getURL("images/stars.jpeg"),
8+
url: chrome.runtime.getURL("images/stars.jpeg"),
99
imageDivId: `${guidGenerator()}`,
1010
tabId: tabs[0].id
1111
},

0 commit comments

Comments
 (0)