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 毫秒