Remover

Removes Nodes

此脚本不应直接安装。它是供其他脚本使用的外部库,要使用该库请加入元指令 // @require https://update.gf.qytechs.cn/scripts/21713/138250/Remover.js

  1. // ==UserScript==
  2. // @name Remover
  3. // @namespace MegaByteRem
  4. // @description Removes Nodes
  5. // @run-at document-end
  6. // @include *
  7. // @version 1
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11.  
  12. Element.prototype.remove = function() {
  13. this.parentElement.removeChild(this);
  14. }
  15. NodeList.prototype.remove = HTMLCollection.prototype.remove = function() {
  16. for(var i = this.length - 1; i >= 0; i--) {
  17. if(this[i] && this[i].parentElement) {
  18. this[i].parentElement.removeChild(this[i]);
  19. }
  20. }
  21. }
  22. function remove(selector) {
  23. document.querySelectorAll(selector).remove();
  24. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址