From 78aa1c3811a0253e9cf080cc7dc784a37ec1d32e Mon Sep 17 00:00:00 2001 From: Charles Nepote Date: Tue, 9 Sep 2025 08:20:15 +0200 Subject: [PATCH 1/2] Quick fix for textarea --- OpenFoodFactsPower.user.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/OpenFoodFactsPower.user.js b/OpenFoodFactsPower.user.js index 90776fc..dae0ae8 100644 --- a/OpenFoodFactsPower.user.js +++ b/OpenFoodFactsPower.user.js @@ -1,8 +1,8 @@ -// ==UserScript== +//// ==UserScript== // @name Open Food Facts power user script // @description Helps power users in their day to day work. Key "?" shows help. This extension is a kind of sandbox to experiment features that could be added to Open Food Facts website. // @namespace openfoodfacts.org -// @version 2025-09-05T13:42 +// @version 2025-09-08T18:19 // @include https://*.openfoodfacts.org/* // @include https://*.openproductsfacts.org/* // @include https://*.openbeautyfacts.org/* @@ -64,7 +64,7 @@ var proPlatform = false; // TODO: to be included in isPageType() const pageType = isPageType(); // test page type const corsProxyURL = ""; - log("2025-09-05T13:42 - mode: " + pageType); + log("2025-09-08T18:19 - mode: " + pageType); // Disable extension if the page is an API result; https://world.openfoodfacts.org/api/v2/product/3222471092705.json if (pageType === "api") { @@ -857,11 +857,11 @@ textarea.monospace { log(event); // If the key is not pressed inside a input field (ex. search product field) if ( - !event.target.matches('input, folksonomy-editor') + !event.target.matches('input, folksonomy-editor, textarea') && !event.target.matches('span.tagify__input') && !event.target.matches('span.tagify__tag-text') ) { - log(event.target); + //log(event.target); // (Shift + B): toggle show/hide barcode if (event.key === 'B') { toggleSingleBarcode(code); From c3ed062a70aeaebb7db70aab1727b39e35762d9d Mon Sep 17 00:00:00 2001 From: Charles Nepote Date: Tue, 9 Sep 2025 08:22:13 +0200 Subject: [PATCH 2/2] Update README with changelog for textarea fix --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 6f7dc79..0b38171 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,8 @@ Once your script manager is installed you can go to https://github.com/openfoodf Just click on the Raw button and your script manager will ask you if you want to install the script. # Changelog +### 2025-09-08T18:19 +* Following last version, quick fix for textarea. ### 2025-09-05T13:42 * Fix conflict with Folksonomy Engine form when typing some keys such as `e` or `a`, which are shortcuts in Power User Script ### 2025-06-17T18:50