From 0327a55c7463bf513f655b83afa75d511d23c268 Mon Sep 17 00:00:00 2001 From: Quentin Rouiller Date: Mon, 27 Apr 2026 03:02:38 +0200 Subject: [PATCH] fix(firefox): ajoute background.scripts fallback (compat MV3 Firefox/AMO) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mozilla AMO rejetait le .xpi avec : Unsupported "/background/service_worker" manifest property used without "/background/scripts" property as Firefox-compatible fallback. build.sh ajoute maintenant 'scripts: [background.js]' à background.* dans le manifest Firefox uniquement (Chrome ignore 'scripts' quand 'service_worker' est présent ; Firefox ignore 'service_worker' et utilise 'scripts'). Les deux navigateurs chargent le même background.js. Sha256 du .xpi v2026.5.41 mis à jour dans firefox-updates.json. --- build.sh | 9 +++++++++ firefox-updates.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 882ce84..2bf2819 100755 --- a/build.sh +++ b/build.sh @@ -33,6 +33,15 @@ m['browser_specific_settings'] = { 'data_collection_permissions': {'required': ['none']} } } +# Firefox MV3 ne supporte pas (encore) 'service_worker' → AMO rejette. +# On ajoute 'scripts' (event page) comme fallback compatible Firefox. +# Chrome ignore 'scripts' quand 'service_worker' est présent ; Firefox +# ignore 'service_worker' et utilise 'scripts'. Les deux navigateurs +# chargent ainsi le même background.js. +bg = m.get('background', {}) +if 'scripts' not in bg: + bg['scripts'] = ['background.js'] +m['background'] = bg with open('dist/firefox/manifest.json', 'w') as f: json.dump(m, f, indent=2, ensure_ascii=False) f.write('\n') diff --git a/firefox-updates.json b/firefox-updates.json index af5e44e..c56f119 100644 --- a/firefox-updates.json +++ b/firefox-updates.json @@ -5,7 +5,7 @@ { "version": "2026.5.41", "update_link": "https://gitea.netaplaid.ch/FroSteel/Planification/releases/download/v2026.5.41/planification-v2026.5.41-firefox.xpi", - "update_hash": "sha256:ad7cd79ed50256e246d93c9fa87fda9db071fc19db14c363f90c3b3b446d3143" + "update_hash": "sha256:3cf688b6d38969100753f8911206b2a42589f7e6948ba75cae1d15fda4332411" }, { "version": "2026.5.40",