fix(firefox): ajoute background.scripts fallback (compat MV3 Firefox/AMO)
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.
This commit is contained in:
@@ -33,6 +33,15 @@ m['browser_specific_settings'] = {
|
|||||||
'data_collection_permissions': {'required': ['none']}
|
'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:
|
with open('dist/firefox/manifest.json', 'w') as f:
|
||||||
json.dump(m, f, indent=2, ensure_ascii=False)
|
json.dump(m, f, indent=2, ensure_ascii=False)
|
||||||
f.write('\n')
|
f.write('\n')
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
{
|
{
|
||||||
"version": "2026.5.41",
|
"version": "2026.5.41",
|
||||||
"update_link": "https://gitea.netaplaid.ch/FroSteel/Planification/releases/download/v2026.5.41/planification-v2026.5.41-firefox.xpi",
|
"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",
|
"version": "2026.5.40",
|
||||||
|
|||||||
Reference in New Issue
Block a user