From 3fc858e957fe5dff602031d687103742ebbee13e Mon Sep 17 00:00:00 2001 From: Guillaume Dott Date: Wed, 13 Feb 2019 14:27:38 +0100 Subject: [PATCH] Update for Courses U new website --- Courses_U_allergies.user.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/Courses_U_allergies.user.js b/Courses_U_allergies.user.js index 872854b..51b4171 100644 --- a/Courses_U_allergies.user.js +++ b/Courses_U_allergies.user.js @@ -4,17 +4,10 @@ // @description Affiche une alerte lorsqu'un produit contient un des ingrédients interdits // @include https://www.coursesu.com/* // @include http://www.coursesu.com/* -// @version 2.2 +// @version 2.3 // @grant none // @require https://code.amnesix.eu/guillaume/allergies-userscripts/raw/branch/master/Allergies-1.1.js // ==/UserScript== (function() { - document.querySelectorAll('#listeInfosProduitsZone .infos').forEach(Allergies.process); - - var productModalZone = document.getElementById('productModalZone'); - var observer = new MutationObserver(function(mutations) { - var composition = mutations[0].addedNodes[0].querySelector('.composition'); - Allergies.process(composition); - }); - observer.observe(productModalZone, {childList: true}); + document.querySelectorAll('div.tab-ingredient p').forEach(Allergies.process); })();