Skip to content

Commit

Permalink
Merge pull request #190 from wikimedia/manifest-v3
Browse files Browse the repository at this point in the history
Migrate to manifest V3
  • Loading branch information
theresnotime authored Aug 7, 2024
2 parents ef8f85b + e0fa0ed commit d788010
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build/extension_content_script.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function main() {
node = document.getElementsByTagName( 'body' )[ 0 ];
script.id = contentScriptId;
script.type = 'text/javascript';
script.src = theBrowser.extension.getURL( 'js/generated.pageScript.js' );
script.src = theBrowser.runtime.getURL( 'js/generated.pageScript.js' );
node.appendChild( script );

// Write to console, for later debugging and bug filtering process for the extension
Expand Down
24 changes: 22 additions & 2 deletions build/extension_manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"manifest_version": 2,
"manifest_version": 3,
"name": "__MSG_name__",
"description": "__MSG_description__",
"default_locale": "en",
Expand Down Expand Up @@ -67,6 +67,26 @@
"css": [ "generated.whowrotethat.css" ],
"run_at": "document_end"
} ],
"web_accessible_resources": [ "js/generated.pageScript.js" ],
"web_accessible_resources": [
{
"resources": [ "js/generated.pageScript.js" ],
"matches": [
"*://ar.wikipedia.org/*",
"*://de.wikipedia.org/*",
"*://en.wikipedia.org/*",
"*://es.wikipedia.org/*",
"*://eu.wikipedia.org/*",
"*://fr.wikipedia.org/*",
"*://hu.wikipedia.org/*",
"*://id.wikipedia.org/*",
"*://it.wikipedia.org/*",
"*://ja.wikipedia.org/*",
"*://nl.wikipedia.org/*",
"*://pl.wikipedia.org/*",
"*://pt.wikipedia.org/*",
"*://tr.wikipedia.org/*"
]
}
],
"permissions": [ "storage" ]
}

0 comments on commit d788010

Please sign in to comment.