Code :
let myColor = "rgb(255,0,0)"; let delay = 200; setTimeout(() => { //let Links = getElementsByTagName('a'); let Links = document.querySelectorAll('a'); for (let Link of Links) { console.log('test'); let linkColor = window.getComputedStyle(Link).getPropertyValue("color" ); console.log(linkColor); // ça sort rgb(104, 29, 168) let targetColor = "rgb(104, 29, 168)"; //Link.style.color=myColor; // ça colorie tous les 'a' if (linkColor == targetColor) { console.log("targetColor detected" ); Link.style.color=myColor; } } }, delay);
|