No More CW V3rm

remove cw from v3rm.net/forums/

  1. // ==UserScript==
  2. // @name No More CW V3rm
  3. // @namespace http://v3rm.net/
  4. // @version 1
  5. // @description remove cw from v3rm.net/forums/
  6. // @author lfgan
  7. // @match https://v3rm.net/forums/*
  8. // @grant none
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14. window.addEventListener('load', function() {
  15. let elements = document.querySelectorAll('a');
  16.  
  17. elements.forEach(function(element) {
  18. if (element.textContent.includes('[CW]')) {
  19. let grandparentDiv = element.closest('div').parentElement.parentElement;
  20.  
  21. if (grandparentDiv && grandparentDiv.tagName.toLowerCase() === 'div') {
  22. grandparentDiv.remove();
  23. }
  24. }
  25. });
  26. }, false);
  27. })();