VRAI bug (que tu as raison de souligner, j'aurais pas dû revert) : la fonction applySelectionFromMessage rejetait TOUT message si pageUrl n'était pas encore settée, ou si les URLs différaient sur un trailing slash / fragment / query. Et pageUrl se populate de façon async via chrome.tabs.query dans refreshPageContext — donc le premier SELECTION_CHANGED arrivait avant pageUrl, était rejeté, et la sélection n'était jamais appliquée. Fixes dans sidepanel.js : - applySelectionFromMessage : si pageUrl vide, on amorce depuis le message (pageUrl, pageTitle, pageDomain, pageFavicon). Sans ce fallback, le bouton « Clipper la sélection » n'apparaît jamais. - Comparaison d'URL tolérante (origin + pathname, sans trailing slash, hash, query). - refreshPageContext : ne pas marquer tab?.url undefined comme restricted. Version bumpée 0.4.1 → 0.4.2 (à chaque livraison comme demandé).
62 lines
1.3 KiB
JSON
62 lines
1.3 KiB
JSON
{
|
|
"manifest_version": 3,
|
|
"name": "__MSG_extName__",
|
|
"version": "0.4.2",
|
|
"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"
|
|
},
|
|
"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"
|
|
}
|
|
},
|
|
"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"
|
|
}
|
|
},
|
|
"icons": {
|
|
"16": "icon-16.png",
|
|
"48": "icon-48.png",
|
|
"128": "icon-128.png"
|
|
}
|
|
} |