Files
BotExt/crx/adblock-cs.js
T
2023-11-04 08:19:08 +08:00

21 lines
633 B
JavaScript

function getElementByXpath(path) {
return document.evaluate(path, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
}
function removeElementByXpath(path) {
var element = getElementByXpath(path);
if (element) {
element.remove();
} else {
// console.log("No element found with the provided XPath: " + path);
}
}
const ele_list = ['//*/div[@class="y-guide"]', '//*/div[@class="auxo-modal-root"]', '//*/div[contains(@class, "index_DragControlle")]']
setInterval(function () {
for (let ele of ele_list) {
removeElementByXpath(ele);
}
}, 500); // 300 毫秒