From 9dfb570aa880b0c2f377bb196697057671618133 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Mon, 6 May 2019 11:34:15 -0400 Subject: [PATCH] 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. --- dist/firefox/publish-signed-beta.py | 2 +- dist/firefox/updates.template.json | 2 +- platform/firefox/manifest.json | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dist/firefox/publish-signed-beta.py b/dist/firefox/publish-signed-beta.py index dee504390..51e215155 100755 --- a/dist/firefox/publish-signed-beta.py +++ b/dist/firefox/publish-signed-beta.py @@ -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) diff --git a/dist/firefox/updates.template.json b/dist/firefox/updates.template.json index f75413a9e..3a78fdb85 100644 --- a/dist/firefox/updates.template.json +++ b/dist/firefox/updates.template.json @@ -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" } diff --git a/platform/firefox/manifest.json b/platform/firefox/manifest.json index 099030ffe..82b09940d 100644 --- a/platform/firefox/manifest.json +++ b/platform/firefox/manifest.json @@ -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__"