From 66d893330fd3ce85b9675a57b8a895390fea254b Mon Sep 17 00:00:00 2001 From: Guillaume Dott Date: Wed, 13 Feb 2019 14:45:57 +0100 Subject: [PATCH] Add script for Leclerc Drive --- LeclercDrive_allergies.user.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 LeclercDrive_allergies.user.js diff --git a/LeclercDrive_allergies.user.js b/LeclercDrive_allergies.user.js new file mode 100644 index 0000000..2a52152 --- /dev/null +++ b/LeclercDrive_allergies.user.js @@ -0,0 +1,17 @@ +// ==UserScript== +// @name Leclerc Drive allergies +// @namespace http://amnesix.eu +// @description Affiche une alerte lorsqu'un produit contient un des ingrédients interdits +// @include https://*.leclercdrive.fr/* +// @include http://*.leclercdrive.fr/* +// @version 0.1 +// @grant none +// @require https://code.amnesix.eu/guillaume/allergies-userscripts/raw/branch/master/Allergies-1.1.js +// ==/UserScript== +(function() { + var ingredients = document.querySelector('div#fiche-produit-composition p.accordeons-detail-paragaphe'); + if(ingredients != null) { + Allergies.process(ingredients); + } +})(); +