User script for your browser, to empower Open Food Facts contribution. Power User Script is a kind of laboratory, to explore new features before they can get into Open Food Facts.
Some features:
- keyboard shortcuts to different pages: product edition (e), product JSON (a), view mode (v), etc.
- styling improvements via CSS: barcode highlighted, fields highlighted, etc.
- show/hide barcode
- show/hide helpers
- sidebar quick links: page translation, category translation, Recent Changes, Hunger Game...
- inline edit of ingredients
- information enhancements beside barcode number: links to Google search, Open Beauty Facts, etc.
- information enhancements in the confirmation page: product issues, going further, etc.
- recent changes filter (filter as you type)
- etc. See complete list in the "changelog" or directly in JS code
To run userscripts it's best to have a script manager installed. Userscript managers are available as browser extensions:
- Greasemonkey – works with Firefox - https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/
- Tampermonkey – works with Chrome, Safari, Firefox and other browsers - http://tampermonkey.net/
Choose an appropriate manager and install it according to the requirements of your browser.
Once your script manager is installed you can go to https://github.com/openfoodfacts/power-user-script/blob/master/OpenFoodFactsPower.user.js
Just click on the Raw button and your script manager will ask you if you want to install the script.
- Exclude search.openfoodfacts.org
- Exclude prices.openfoodfacts.org
- Fix kJ/kcal ratio to 4.2 instead of 4.4
- Product list: rotate images
- Search as you type to filter changes. Useful for many cases:
- find additions or changes
- monitor changes for specific fields
- monitor changes from specific users
- Products' list: add button to each product to open Hunger Game
- Add option to display barcodes by default
- Edit mode: compute and display energy in real-time
- Let panels use less space
- Add "History" anchor in the nav bar
- Check serving size field
- Colorize icon ⇅ when kJ/kcal values are not coherent (ratio is displayed inside ⇅ tooltip)
- Small UI improvements (smaller fixed validation bar)
- Better organization of the code; more code in vanilla JS (faster and less dependant from libraries)
- Button ⇅ to reverse kj/kcal
- "No quality errors" is back
- Hack to prevent product opener regression in saved-product page
- Distraction free mode: Open Food Facts top bar is hidden. Option to check or uncheck (by default) in the settings.
- The nutrition facts form has many improvements: now fits in one screen on a HD display at 100%.
- fix nutrition image size on Chrome and Safari
- Delete hunger games links which are now in Product Opener.
- CSS tweaks:
- nutrition facts table more condensed
- products issues are well displayed
- Categories, brands and labels' facets: added Hunger Game deep link as a button right after the title
- Edition:
- Quick and dirty hack to control and manage kj/kcal inversion
- Control fiber field
- Remove "edit" button feature in list mode (added in Product Opener)
- Fix some regressions due to Open Food Facts redesign of 2022-10
- Add a deep link to Hunger Game for brand on product's page
- Add "n" keyboard shortcut in list mode to reload the list without cache (&nocache=1 parameter)
- Add ->OPetFF button in list mode (to move products to Open Pet Food Facts), and improve error handling
- Add ->OPF button in list mode (to move products to Open Products Facts)
- Recent changes link displays 100# instead of 900#
- Fix product list view tweaks to work with new layout
- Add graphical barcodes to list view (shift-B) (Issue #26)
- Add option to set ingredient textareas to fixed width font, to make it easier to see bad OCR, such as when it confuses "m" and "rn" (e.g. corn), lowercase l/L and uppercase i/I, letter O with number 0, etc.
- minor fixes and code tidying
- fixes from @svensven (thanks!)
- Categorization opportunities link
- Add DuckDuckGo link for product barcode (near the barcode)
- Deep link to Hunger Game when the page is related to a category, label or brand
- exclude wiki pages from script
- Modify link to hunger game
- Nutrition facts picture takes all the place available: should work for every modern browser (CSS3)
- very small update, the "a" key now opens the json page in a new window (instead of Alt+Shift+A)
- Confirmation page: quality errors and quality warnings displayed in red (or green when it's all right)
- Google Link for product barcode (near the barcode)
- Link to Open Pet Food Facts (near the barcode)
- Firefox: Nutrition facts picture takes all the place available
- Add openbeautyfacts.org link and its status code (200 = the product exists; 404 it doesn't)
- Add .pro.openffodfacts.org link (status code isn't working)
- Add "ingredient mode" to simplify ingredients management => ("i" key in "edit" mode)
- Developper: console.log messages more clear
- Add a field to filter Recent Changes results (filter as you type)
- Add version date to flag feature
- Add Hunger Game link
- Various fixes
- Change "?" menu position
- Edit mode: show/hide field help comments
- flagging improvement
- allow flagging on page which is not a revision
- add product_improvement
- reorganize menu and add separators
- Detect pro platform + add product public URL
- Add quick links in the sidebar
- Refactor help box
- change @updateURL to https://github.com/openfoodfacts/power-user-script/raw/master/OpenFoodFactsPower.user.js
- comment code made for easier to read number of products because of openfoodfacts/openfoodfacts-server#2474
- number of products easier to read (with separators depending on your locale); see: openfoodfacts/openfoodfacts-server#2474
- initial publication on this current Github repo