Removes Nodes
이 스크립트는 직접 설치하는 용도가 아닙니다. 다른 스크립트에서 메타 지시문 // @require https://update.greasyfork.org/scripts/21713/138250/Remover.js을(를) 사용하여 포함하는 라이브러리입니다.
// ==UserScript==
// @name Remover
// @namespace MegaByteRem
// @description Removes Nodes
// @run-at document-end
// @include *
// @version 1
// @grant none
// ==/UserScript==
Element.prototype.remove = function() {
this.parentElement.removeChild(this);
}
NodeList.prototype.remove = HTMLCollection.prototype.remove = function() {
for(var i = this.length - 1; i >= 0; i--) {
if(this[i] && this[i].parentElement) {
this[i].parentElement.removeChild(this[i]);
}
}
}
function remove(selector) {
document.querySelectorAll(selector).remove();
}