too many errors when trying to check dom update
This commit is contained in:
parent
6f614fec62
commit
588e7f6f99
19
renderer.js
19
renderer.js
@ -81,25 +81,6 @@ onload = () => {
|
||||
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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user