diff --git a/xExtension-ColorfulList/static/script.js b/xExtension-ColorfulList/static/script.js index c6380d1..1342bc4 100644 --- a/xExtension-ColorfulList/static/script.js +++ b/xExtension-ColorfulList/static/script.js @@ -12,14 +12,15 @@ function monitorEntry(monitorCallback) { const callback = function (mutationsList, observer) { for (const mutation of mutationsList) { if (mutation.type === 'childList') { - monitorCallback(mutationsList); - } - } + monitorCallback(mutationsList); + }; + }; }; const observer = new MutationObserver(callback); - if(targetNode) + if(targetNode){ observer.observe(targetNode, config); -} + }; +}; function colorize() { const entry = document.querySelectorAll('.flux_header'); @@ -27,7 +28,7 @@ function colorize() { const cl = stringToColour(e.querySelector('.website').textContent) + '12'; e.style.background = cl; }); -} +}; const stringToColour = (str) => { let hash = 0; @@ -38,6 +39,6 @@ const stringToColour = (str) => { for (let i = 0; i < 3; i++) { const value = (hash >> (i * 8)) & 0xff; color += value.toString(16).padStart(2, '0'); - } + }; return color; };