Update for Courses U new website
parent
5f7795d971
commit
3fc858e957
|
@ -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);
|
||||
})();
|
||||
|
|
Loading…
Reference in New Issue