From 9840633305bb5ee702710d8449f9fc709eba8723 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Pelletier?= Date: Tue, 1 Jul 2025 07:16:08 -0400 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20Impl=C3=A9mentation=20de=20?= =?UTF-8?q?la=20correction=20via=20le=20menu=20contextuel=20et=20am=C3=A9l?= =?UTF-8?q?iorations=20de=20la=20construction?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ✨ Ajout de la fonctionnalité de correction via le menu contextuel. - 🗑️ Suppression de la fonctionnalité de correction en temps réel. - ➕ Ajout du script de fond (background.js) pour gérer le menu contextuel. - 📝 Mise à jour du manifest.json (permissions, service_worker, description). - 🐛 Correction de la logique de remplacement de texte dans content.js pour une meilleure compatibilité. - 🏗️ Mise à jour du Dockerfile pour construire l'extension Chrome dans un répertoire (non zippé). - 🛠️ Mise à jour du script build.sh pour gérer le nouveau format de sortie et nettoyer le répertoire. - 🌐 Traduction du manifest.json en français. - 📄 Ajout d'un README.md complet avec les instructions d'installation. - 🐛 Ajout de logs pour faciliter le débogage. --- .gitignore | 3 ++ Dockerfile | 32 ++++++++++++ LICENSE | 73 +++++++++++++++++++++++++++ README.md | 50 +++++++++++++++++++ background.js | 43 ++++++++++++++++ build.sh | 12 +++++ content.js | 122 +++++++++++++++++++++++++++++++++++++++++++++ images/icon128.png | Bin 0 -> 2670 bytes images/icon16.png | Bin 0 -> 376 bytes images/icon48.png | Bin 0 -> 1129 bytes manifest.json | 40 +++++++++++++++ popup.html | 29 +++++++++++ popup.js | 8 +++ 13 files changed, 412 insertions(+) create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100644 LICENSE create mode 100644 README.md create mode 100644 background.js create mode 100755 build.sh create mode 100644 content.js create mode 100644 images/icon128.png create mode 100644 images/icon16.png create mode 100644 images/icon48.png create mode 100644 manifest.json create mode 100644 popup.html create mode 100644 popup.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..db2a7a1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +chrome-extension.zip +output/ +.DS_Store diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8440893 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,32 @@ +# Stage 1: The Builder +# This stage takes a lightweight Alpine Linux image, installs the 'zip' utility, +# and then copies your extension files into it to create the packages. +FROM alpine:latest AS builder + +# Set the working directory inside the container. +WORKDIR /extension + +# Copy all the extension files into the working directory. +# Ensure your Dockerfile is in the same directory as these files. +COPY manifest.json . +COPY popup.html . +COPY popup.js . +COPY content.js . +COPY background.js . +COPY images/ ./images/ + +# Stage 2: The Final Package +# This stage is a minimal image whose only purpose is to hold the final packages. +# Using alpine instead of scratch and adding a CMD makes it easier to interact with. +FROM alpine:latest + +# Set the output directory. +WORKDIR /output + +# Create a subdirectory for the Chrome extension and copy all files into it. +RUN mkdir chrome-extension +COPY --from=builder /extension/ ./chrome-extension/ + +# Add a default command to list the contents of the output directory. +# This makes the container runnable and prevents the "no command specified" error. +CMD ["ls", "-l"] diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..28bdba7 --- /dev/null +++ b/LICENSE @@ -0,0 +1,73 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. + +Copyright 2025 jevalideca + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/README.md b/README.md new file mode 100644 index 0000000..38eb703 --- /dev/null +++ b/README.md @@ -0,0 +1,50 @@ +# Outil d'écriture inclusive en français + +Cette extension Chrome convertit le texte sélectionné pour utiliser le point médian inclusif (·) via un menu contextuel. + +## Fonctionnalités + +* Conversion du texte sélectionné en écriture inclusive (point médian). +* Intégration via le menu contextuel du navigateur. + +## Installation + +Suivez ces étapes pour installer et utiliser l'extension dans votre navigateur Chrome. + +### Prérequis + +* [Docker](https://www.docker.com/get-started) : Utilisé pour construire l'extension dans un environnement isolé. + +### Étapes de construction + +1. **Cloner le dépôt** (si ce n'est pas déjà fait) : + ```bash + git clone [URL_DE_VOTRE_DEPOT] + cd point-median-extension + ``` + *(Remplacez `[URL_DE_VOTRE_DEPOT]` par l'URL réelle de votre dépôt Git.)* + +2. **Construire l'extension** : + Exécutez le script de construction. Cela va créer un dossier `output/chrome-extension` contenant tous les fichiers nécessaires à l'extension. + ```bash + ./build.sh + ``` + +### Chargement de l'extension dans Chrome + +1. **Ouvrez Chrome** et naviguez vers `chrome://extensions`. +2. **Activez le "Mode développeur"** en basculant l'interrupteur situé en haut à droite de la page. +3. Cliquez sur le bouton **"Charger l'extension non empaquetée"** (Load unpacked). +4. Dans la boîte de dialogue qui apparaît, naviguez jusqu'au répertoire de votre projet et sélectionnez le dossier `output/chrome-extension` que vous avez créé à l'étape de construction. +5. L'extension "Outil d'écriture inclusive en français" devrait maintenant apparaître dans votre liste d'extensions. + +### Utilisation + +1. Sélectionnez du texte sur n'importe quelle page web. +2. Faites un clic droit sur le texte sélectionné. +3. Dans le menu contextuel, sélectionnez **"Convertir en écriture inclusive"**. +4. Le texte sélectionné sera remplacé par sa version inclusive. + +## Dépannage + +Si l'extension ne fonctionne pas comme prévu, vérifiez la console du navigateur (Ctrl+Maj+I ou Cmd+Option+I, puis onglet "Console") et la console du service worker de l'extension (cliquez sur "Inspecter la vue" ou "Service Worker" sous l'extension dans `chrome://extensions`) pour d'éventuels messages d'erreur. diff --git a/background.js b/background.js new file mode 100644 index 0000000..4771ff1 --- /dev/null +++ b/background.js @@ -0,0 +1,43 @@ +chrome.runtime.onInstalled.addListener(() => { + console.log("Background script: Extension installed or updated."); + chrome.contextMenus.create({ + id: "convertText", + title: "Convertir en écriture inclusive", + contexts: ["selection"] + }); + console.log("Background script: Context menu item created."); +}); + +chrome.contextMenus.onClicked.addListener((info, tab) => { + console.log("Background script: Context menu item clicked.", info); + if (info.menuItemId === "convertText" && info.selectionText && tab && tab.id) { + console.log(`Background script: Selected text: "${info.selectionText}" in tab ID: ${tab.id}`); + // First, ensure the content script is injected into the tab. + // This is crucial if the tab was opened before the extension was installed/updated, + // or if the content script somehow failed to load. + chrome.scripting.executeScript({ + target: { tabId: tab.id }, + files: ['content.js'] + }, () => { + // Check for runtime.lastError to see if injection failed + if (chrome.runtime.lastError) { + console.error("Background script: Error injecting content script:", chrome.runtime.lastError.message); + return; + } + console.log("Background script: Content script injected/confirmed."); + // After the content script is (re)injected, send the message. + chrome.tabs.sendMessage(tab.id, { + action: "convertSelectedText", + text: info.selectionText + }).then(response => { + console.log("Background script: Message sent to content script. Response:", response); + }).catch(error => { + // Catch potential errors if the receiving end still doesn't exist + // (e.g., tab closed immediately after context menu click). + console.error("Background script: Error sending message to content script:", error); + }); + }); + } else { + console.log("Background script: Context menu click conditions not met."); + } +}); \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..f1c0cd4 --- /dev/null +++ b/build.sh @@ -0,0 +1,12 @@ +# Clean up previous build artifacts +rm -rf output + +# Build the image +docker build -t extension-packager . + +# Create the output directory if it doesn't exist +mkdir -p output + +ID=$(docker create extension-packager) +docker cp $ID:/output/chrome-extension ./output/chrome-extension +docker rm -v $ID \ No newline at end of file diff --git a/content.js b/content.js new file mode 100644 index 0000000..b24a60f --- /dev/null +++ b/content.js @@ -0,0 +1,122 @@ +/** + * This content script handles the conversion of selected text to use the inclusive middle dot. + * It receives messages from the background script to perform the conversion. + */ + +/** + * Converts text to use the inclusive middle dot (·). + * This function contains the original conversion logic. + * @param {string} texte The input text. + * @returns {string} The converted text. + */ +function convertirPointMedian(texte) { + let currentText = texte; + const sep = /[.\-]/; // Recognizes '.' or '-' as separators + + // Rules with 3 components (e.g., "mot.e.s") + const regles3 = [ + { find: new RegExp(`(\\w+)${sep.source}(\\w+[es]*)${sep.source}([es]+)`, 'g'), replace: '$1·$2·$3' }, + { find: new RegExp(`([td]eur)${sep.source}([td]rice)${sep.source}([s]+)`, 'g'), replace: '$1·$2·$3' }, + { find: new RegExp(`(eur)${sep.source}(ice|euse)${sep.source}([s]+)`, 'g'), replace: '$1·$2·$3' }, + { find: new RegExp(`(er)${sep.source}(ère)${sep.source}([s]+)`, 'g'), replace: '$1·$2·$3' }, + { find: new RegExp(`([fs])${sep.source}([fs]{2}e)${sep.source}([s]+)`, 'g'), replace: '$1·$2·$3' }, + { find: new RegExp(`([eo][lnt])${sep.source}([eo]?[lnt]+e)${sep.source}([s]+)`, 'g'), replace: '$1·$2·$3' } + ]; + regles3.forEach(rule => { currentText = currentText.replace(rule.find, rule.replace); }); + + // Rules with 2 components (e.g., "mot.s") + const regles2 = [ + { find: new RegExp(`(\\w+)${sep.source}([es]+)`, 'g'), replace: '$1·$2' }, + { find: new RegExp(`([td]eur[s]?)${sep.source}([td]?rice[s]?)`, 'g'), replace: '$1·$2' }, + { find: new RegExp(`(eur[s]?)${sep.source}(euse[s]?|ice[s]?)`, 'g'), replace: '$1·$2' }, + { find: new RegExp(`(eux|el)${sep.source}(elle[s]?|euse[s]?|le[s]?)`, 'g'), replace: '$1·$2' }, + { find: new RegExp(`(aux|al)${sep.source}(ale[s]?)`, 'g'), replace: '$1·$2' }, + { find: new RegExp(`(er[s]?)${sep.source}(ère[s]?)`, 'g'), replace: '$1·$2' }, + { find: new RegExp(`([s])${sep.source}([s]{2}e[s]?)`, 'g'), replace: '$1·$2' }, + { find: new RegExp(`([eo][flnt][s]?)${sep.source}([eo]?[flnt]+e[s]?)`, 'g'), replace: '$1·$2' }, + { find: new RegExp(`(\\w+e)${sep.source}(\\w+a)`, 'g'), replace: '$1·$2' }, + { find: new RegExp(`(\\w+t)${sep.source}(te)`, 'g'), replace: '$1·$2' } + ]; + regles2.forEach(rule => { currentText = currentText.replace(rule.find, rule.replace); }); + + // Rules using parentheses (e.g., "mot(s)") + const reglesp = [ + { find: /(\w+)[\(]([es]+)[\)]/g, replace: '$1·$2' }, + { find: /([td]eur[s]?)[\(]([td]?rice[s]?)[\)]/g, replace: '$1·$2' }, + { find: /(eur[s]?)[\(](euse[s]?|ice[s]?)[\)]/g, replace: '$1·$2' }, + { find: /(eux|el)[\(](elle[s]?|euse[s]?|le[s]?)[\)]/g, replace: '$1·$2' }, + { find: /(aux|al)[\(](ale[s]?)[\)]/g, replace: '$1·$2' }, + { find: /(er[s]?)[\(](ère[s]?)[\)]/g, replace: '$1·$2' }, + { find: /([s])[\(]([s]{2}e[s]?)[\)]/g, replace: '$1·$2' }, + { find: /([eo][flnt][s]?)[\(]([eo]?[flnt]+e[s]?)[\)]/g, replace: '$1·$2' }, + { find: /(\w+e)[\(](\w+a)[\)]/g, replace: '$1·$2' }, + { find: /(\w+t)[\(](te)[\)]/g, replace: '$1·$2' } + ]; + reglesp.forEach(rule => { currentText = currentText.replace(rule.find, rule.replace); }); + + return currentText; +} + +// Listen for messages from the background script. +chrome.runtime.onMessage.addListener((request, sender, sendResponse) => { + console.log("Content script: Message received.", request); + if (request.action === "convertSelectedText" && request.text) { + console.log(`Content script: Converting text: "${request.text}"`); + const convertedText = convertirPointMedian(request.text); + console.log(`Content script: Converted text: "${convertedText}"`); + + // Try to use document.execCommand for better compatibility with contenteditable elements + // and to maintain undo/redo history. + if (document.execCommand('insertText', false, convertedText)) { + console.log("Content script: Text replaced using execCommand."); + // If execCommand was successful, dispatch an input event to notify frameworks. + const activeElement = document.activeElement; + if (activeElement) { + activeElement.dispatchEvent(new Event('input', { bubbles: true })); + console.log("Content script: Dispatched input event."); + } + sendResponse({ success: true, newText: convertedText }); + } else { + // Fallback for elements where execCommand might not work or for direct text selections. + console.log("Content script: execCommand failed, falling back to window.getSelection."); + const selection = window.getSelection(); + if (selection.rangeCount > 0) { + const range = selection.getRangeAt(0); + range.deleteContents(); // Remove the selected text + range.insertNode(document.createTextNode(convertedText)); // Insert the new text + console.log("Content script: Text replaced using window.getSelection."); + + // Manually dispatch an input event if the target is an editable element + // and execCommand didn't handle it. + const activeElement = document.activeElement; + if (activeElement && (activeElement.isContentEditable || + activeElement.tagName.toLowerCase() === 'textarea' || + (activeElement.tagName.toLowerCase() === 'input' && /text|search|email|url|tel/.test(activeElement.type)))) { + activeElement.dispatchEvent(new Event('input', { bubbles: true })); + console.log("Content script: Dispatched input event (fallback)."); + } + sendResponse({ success: true, newText: convertedText }); + } else { + console.log("Content script: No selection found for fallback replacement."); + sendResponse({ success: false, error: "No selection found." }); + } + } + + // After replacement, clear the selection to prevent accidental re-insertion + // or issues with the "buffer" as described by the user. + const selection = window.getSelection(); + if (selection) { + selection.empty(); // For Chrome/Safari + if (selection.removeAllRanges) { // For Firefox + selection.removeAllRanges(); + } + console.log("Content script: Selection cleared."); + } + + } else { + console.log("Content script: Message not for text conversion or missing text.", request); + sendResponse({ success: false, error: "Invalid request." }); + } + // Return true to indicate that sendResponse will be called asynchronously. + return true; +}); diff --git a/images/icon128.png b/images/icon128.png new file mode 100644 index 0000000000000000000000000000000000000000..bab7c164f62f58053d609e38563544ac0f584515 GIT binary patch literal 2670 zcmV-!3X%1RP)%4viasJS+;PE&%PJ1$bt@B2J}V16At) zn(}rySCJzog%)5*H*gVfHqZ~;2OJNo2&Mp+084=Vz)s+QK^2vh)xbes{k}d7T#No! zyB_l#V7)S}jwJ8;FNy)+oys&KO6CI3)40+83iK$_$*KeNBzZPU<4B@8k`Z6V+;BBu z8?d-ZI%zw=;v^4^mM>YBF$hJO1fHjicRA1td101u6 zI~lkM*av(ZXiJfATaw1UB+bbd&)R5?7}$hv*qtc+0a%r!WAh4Fl|0*Oz8}uG4k}F> z^2yg~V~hc}1Dh3bHz#q&Qsj3J=|-N&1atvk1BPk6VMa5G(1qEsXxmjVAIyM`YCt|ETg6^c2?mT}s~?@!W-6ohu<*LsNTMt~#0 z^;GPzND)~JJdV3Lz*E3RZ>5Q-nUBoO(=6ZGgnN(^K#{;q0d7W)h52asSB967PtSOv zBmiy54&ed(H++3~23d?M%GP?}xd8Yr;Tyg_{F!(b&?!@a?~s1CE{iyg!f2u~%hN~^ zgyZxR)n!({zLfiJy#_awV-d#&%$7l8()Zpry&Pt>(Ka<2rCcQ6?^H zTX<$avQ2w2u(yTh_a@I?nxth*PYcg@rzjoZghkvJfvv!~$T70C+?S-aHA!2`a0Yot z5;mZlfSI;w)7}f1jegttJ=Ud+G^8Cla@DA^9|q1>q?6Unp!1VF8>O+6;*73^VHWT+ zUR}|Bz(*|7$ntI=N#1>R&u;@}TBH%N8fQl14K*fn2pyI?1P;p`hs5r3$RGhM(TIocVj(d=$+AA@ef}IDP zh3qO$LN0}jxsw>ln&rR^z`ejAt)J)_4@Z-uBR~^+fo~v zgbj%04clM*X8dk!wF6tQ9}!*x-s@3kp?EuXYxiTow}8_^h)tLd+=ktP)FAM-5MuMp z>A=(IEAcS!z932`<|6Fu75@t`c^cC!WUu;EU)h?E&&_ zm1{c9FR|8#FNBeqAC{q?^lit^X;UaBBe#RKlfpNJkr|$L^wz!}L2LpRg(-+;P1$yl z{}ov$T#c@R`Y7fO+v_;>>Ug8DC5*&ybfKH|AEzJ=7#naNGR&LG*$=!Xkj5Z<2Hh{? z`cMKhW{2J41={#aWow&4($cE&e5#&CibFx$M5*u~%UJ=KV1;D=r)Tz|ReF z+JTRH&=QQ_VIBt81XJgpHJHo)a4>a_nT>fORQ9uTZJ6EJod90zOOVf3zy{2hQSbC2 zBp@~971xYOcsw-Xvje=uRpf_f6>&;60(2?j3_4elAC4>Hc-b2E)d5BoaYmf0 z$PX_o;?$h0z+VT@m|3gB8o)Rjy8)%@0GeO-4CgBHgU0@VX4FiLuMTin5vNL5r8M98 znu%g+e06|-E8;A6Eh0ypt%!5bxeD^t0p93bMSd{d2C5-uY@Fk(0}NsQ&acvyX_Lv> zXAui2rD6xoH$aAvowBks74v<_EPNiT@Od8KQN#bIPz_^BYcMbJnCdDse0G4pDB@h= zTt#>`D&p*Rt|9=lkn?WMhQ0yH?Zco0nGlVG(k{LsP~| zS`lwUZ%}a$o-Rsc#OcUA2Tj@Tr=oTOLDmJ1p{uAz$j+6EOJ)LpLRY4v*m*K3C7(rC zSv90$^K3M79`FSE@@Q5DOHVtpM69i}e~_IMsVrH6?(=p$+)0Ip{(7dN`&NGC(78E? z(uuhWInbij-%BxGXI@zf{1<&C){rG*&Amfc%twC7HkzMDcPO-yT!_8P_ZJY??mkV) zcLSeqLF-ZA9UgTSl6A=4Ih%^DA*NQZ!>vP!(}1nWiCtTLL%>>x+DgTG;6>~!xt2V4 z8}M$jSzB*MHgmq4Qd9I6X2}Zd97#KV`M?9E)3faQ7aRxO}H~=hf ztqR_w5{o8z{|sz}Il#rp;>}vp z@3$X7OuOzvjoAlt|1Bw+!vq&t(7#+rtZ*T^ws@o7KscVySDN(L+= ckw~TZKe#96|DCgWV*mgE07*qoM6N<$f^Yfq^#A|> literal 0 HcmV?d00001 diff --git a/images/icon16.png b/images/icon16.png new file mode 100644 index 0000000000000000000000000000000000000000..da3ccd46f123bbb986bb49b74dd5faccc1ea1838 GIT binary patch literal 376 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf2?- zG7x6;t5)LxG9*h}BT9nv(@M${i&7cN%ggmL^RkPR6AM!H@{7`Ezq647D*Ec_;uvDl zJN2@mzKf#>>w|nzDcis|X~|cWqys;(v-G++xhqc0_^#g(6u>z*$n2t*i|b4N4z^yW zjV=opRG2G0-dkBXDf&+Jxj8d;mbckV+b~1eMC(<0#W9a3?<+eZos+Q4C*oSOY|LZU*InoK zyXEfAd#-0^5P#_GL*8J^W@nj{AIfk3>n#a?@xUm#p!MV&MxJyYsYw@?vu%$!C$Z*% z+TrZvhO0t(#yir^H9Y#xThO;QqGI8U15R4&s!sXlBv^g2mU(O_TE`qvrMWlGZc+;{ P02n-7{an^LB{Ts54(yS4 literal 0 HcmV?d00001 diff --git a/images/icon48.png b/images/icon48.png new file mode 100644 index 0000000000000000000000000000000000000000..d82a70f492a4b8bb1fe376b174215f48b6430148 GIT binary patch literal 1129 zcmV-v1eW`WP)z@;j|==^1poj5AY({UO#lFTCIA3{ga82g0001h=l}q9FaQARU;qF* zm;eA5aGbhPJOBUy24YJ`L;(K){{a7>y{D4^000SaNLh0L00XfA00XfB^@Ht600007 zbV*G`2k8d^3J?IWR?HXx00XT_L_t(&-qo2)NR&|&fWL9H$$XThR`$@6poCsf6hcB! zgoy=3i-HVVL@y{wHxcBfmPOD5(nSd^qUf;*ZBv_S*MmSQa8xQV%4eDRn9&w+0IwvT&+3^(Mq{dVLxC<0I*nvVB3urhe;%SMSfgxe!4X_Q^5BMGC z`ekgZ%pDWl=6GMDVxSE0Y5h)?I1E0)DR#TKiAVHm3OGZ+lSJ}H;|9}S0Iy+sDZpw8 zV0HnEq(1-*ir>>M_9CHRp?I4uidJ%JL!ympfCY)bcq(u%N+(WlT_SX<=}>So0sAdr zi`G9XC(#0YlfGOrWGfur-AkYXXpQC0uaaO!caty4SZajRDgrLcTotz+SQ#tkm&iR< zgOz)ebdw7NM|J-ELfa}N15Y*Ir)G-U%qzI6Z`5epLp`qS+9+_rr7cMUE^4QF%og*R z+P!ZSy>G&HsHfTrWY`d(LRn-0SYwd(THv=r|DX*4o+}I7w?JQwrJtE5o8(v_i z1p&%5m25Op+pK7deoJ9sw$Ki1w@oI!(L6;}ewKwyLqG6EQL%X@1<2GE8nGZifKWQ# zX-(Gx1T+I=BaZNBMl5JjfKKImo$^z-K8Y_6uvolH(=cDT_k;4*j0xaZ zP9cd-60W%EJ_DOyyO#h}0OT3Z4Da0Uf$RO>*8to0XTF(eEUToGcUp@3mOqOssNA zby`f@D~r#G0zV6=CR6|)(;lvu7=aJC!T7pB2XGbGAv!$^m@5gcQsA1r9lcI)-I8(q zuMIiE_`-$CSdW}eq{>YnaFjTwI17N=;)q3?)cQrJO23Q*0S}=HWwj)#xMdl1b`O" + ], + "js": [ + "content.js" + ], + "run_at": "document_idle" + } + ] +} \ No newline at end of file diff --git a/popup.html b/popup.html new file mode 100644 index 0000000..6860057 --- /dev/null +++ b/popup.html @@ -0,0 +1,29 @@ + + + + + + Inclusive French Tool + + + + + +
+ Real-time Conversion + +
+

+ When enabled, the extension will automatically convert text like "auteur.e.s" to "auteur·e·s" as you type. +

+ + + diff --git a/popup.js b/popup.js new file mode 100644 index 0000000..1ee2eff --- /dev/null +++ b/popup.js @@ -0,0 +1,8 @@ +/** + * This script handles the logic for the extension's popup. + * As the real-time conversion is removed, this popup is now minimal. + */ +document.addEventListener('DOMContentLoaded', () => { + // No specific functionality needed for the popup with context menu approach. + // This script can be removed or kept minimal if no UI elements are required. +});