From 588e7f6f990ceb33c1497a52252c8a3012bc70f1 Mon Sep 17 00:00:00 2001 From: khlam <4841220+khlam@users.noreply.github.com> Date: Sat, 19 Oct 2019 12:17:57 -0700 Subject: [PATCH] too many errors when trying to check dom update --- renderer.js | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/renderer.js b/renderer.js index f2390cc..6003939 100644 --- a/renderer.js +++ b/renderer.js @@ -80,26 +80,7 @@ onload = () => { if (e.message === "discord-load-complete") { webview.executeJavaScript(` document.getElementsByClassName("listItem-2P_4kh")[document.getElementsByClassName("listItem-2P_4kh").length - 1].remove(); - - const targetNode = document.getElementsByClassName("scroller-2FKFPG firefoxFixScrollFlex-cnI2ix systemPad-3UxEGl scroller-2TZvBN")[0] - - const config = { attributes: true, childList: true, subtree: true }; - const callback = function(mutationsList, observer) { - for(let mutation of mutationsList) { - if (mutation.type === 'childList') { - console.log('DOM changed'); - } - else if (mutation.type === 'attributes') { - console.log('DOM changed'); - } - } - }; - - const observer = new MutationObserver(callback); - - observer.observe(targetNode, config); - `) removeBloat(webview) }