1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-08 12:57:57 +02:00

Use browser_specific_settings instead of applications

As per MDN's documentation, `applications` is a non-standard
alias for `browser_specific_settings` in `manifest.json`:

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/browser_specific_settings#Browser_compatibility

Best to use the official manifest key.
This commit is contained in:
Raymond Hill 2019-05-06 11:34:15 -04:00
parent 3692bb4ada
commit 9dfb570aa8
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
3 changed files with 8 additions and 8 deletions

View File

@ -161,7 +161,7 @@ with zipfile.ZipFile(raw_xpi_filepath, 'r') as zipin:
data = zipin.read(item.filename)
if item.filename == 'manifest.json':
manifest = json.loads(bytes.decode(data))
manifest['applications']['gecko']['update_url'] = 'https://raw.githubusercontent.com/{0}/{1}/master/dist/firefox/updates.json'.format(github_owner, github_repo)
manifest['browser_specific_settings']['gecko']['update_url'] = 'https://raw.githubusercontent.com/{0}/{1}/master/dist/firefox/updates.json'.format(github_owner, github_repo)
data = json.dumps(manifest, indent=2, separators=(',', ': '), sort_keys=True).encode()
zipout.writestr(item, data)

View File

@ -4,7 +4,7 @@
"updates": [
{
"version": "$ext_version",
"applications": { "gecko": { "strict_min_version": "55" } },
"browser_specific_settings": { "gecko": { "strict_min_version": "55" } },
"update_info_url": "https://github.com/gorhill/uBlock/releases/tag/$tag_version",
"update_link": "https://github.com/gorhill/uBlock/releases/download/$tag_version/uBlock0_$tag_version.firefox.signed.xpi"
}

View File

@ -1,10 +1,4 @@
{
"applications": {
"gecko": {
"id": "uBlock0@raymondhill.net",
"strict_min_version": "55.0"
}
},
"author": "All uBlock Origin contributors",
"background": {
"page": "background.html"
@ -18,6 +12,12 @@
"default_title": "uBlock Origin",
"default_popup": "popup.html"
},
"browser_specific_settings": {
"gecko": {
"id": "uBlock0@raymondhill.net",
"strict_min_version": "55.0"
}
},
"commands": {
"launch-element-zapper": {
"description": "__MSG_popupTipZapper__"