Bug réel : la bannière 'Surlignez le texte à clipper' n'apparaissait jamais en pratique parce que le side panel envoyait SET_PICK_MODE avant que le content script ne soit prêt (race condition MV3 entre chrome.scripting.executeScript et la mise en place du listener chrome.runtime.onMessage). Le retry PING dans ensureContentScript ne suffisait pas : le listener sidepanel peut aussi être en retard. Fix radical : content.js affiche la bannière IMMÉDIATEMENT à l'initialisation, sans attendre SET_PICK_MODE. L'utilisateur voit immédiatement que l'extension est active. Un bouton ✕ permet de la fermer (state local au tab). Pas de dépendance sur le side panel pour le feedback visuel. + manifest : retrait de optional_host_permissions (redondant avec host_permissions http://*/* et https://*/*, peut perturber Chrome en dev). + bannière rediseignée : max-width 640px responsive, animation slideIn, bouton ✕ accessible. + nouvelles clés i18n bannerDismiss dans les 15 locales. + build : exclusion de store-assets/ du zip et du xpi (sinon le package Store faisait 327 Ko au lieu de 47 Ko).
62 lines
1.3 KiB
JSON
62 lines
1.3 KiB
JSON
{
|
|
"manifest_version": 3,
|
|
"name": "__MSG_extName__",
|
|
"version": "0.4.0",
|
|
"description": "__MSG_extDescription__",
|
|
"default_locale": "en",
|
|
"permissions": [
|
|
"activeTab",
|
|
"scripting",
|
|
"storage",
|
|
"sidePanel",
|
|
"tabs"
|
|
],
|
|
"host_permissions": [
|
|
"https://memento-note.com/*",
|
|
"https://www.memento-note.com/*"
|
|
],
|
|
"background": {
|
|
"service_worker": "background.js"
|
|
},
|
|
"sidebar_action": {
|
|
"default_title": "__MSG_extActionTitle__",
|
|
"default_panel": "sidepanel.html",
|
|
"default_icon": {
|
|
"16": "icon-16.png",
|
|
"48": "icon-48.png",
|
|
"128": "icon-128.png"
|
|
}
|
|
},
|
|
"browser_specific_settings": {
|
|
"gecko": {
|
|
"id": "memento-clipper@memento-note.com",
|
|
"strict_min_version": "115.0"
|
|
}
|
|
},
|
|
"content_scripts": [
|
|
{
|
|
"matches": [
|
|
"https://memento-note.com/*",
|
|
"https://www.memento-note.com/*"
|
|
],
|
|
"js": [
|
|
"content.js"
|
|
],
|
|
"run_at": "document_idle",
|
|
"all_frames": false
|
|
}
|
|
],
|
|
"action": {
|
|
"default_title": "__MSG_extActionTitle__",
|
|
"default_icon": {
|
|
"16": "icon-16.png",
|
|
"48": "icon-48.png",
|
|
"128": "icon-128.png"
|
|
}
|
|
},
|
|
"icons": {
|
|
"16": "icon-16.png",
|
|
"48": "icon-48.png",
|
|
"128": "icon-128.png"
|
|
}
|
|
} |