Darkumbra anti-adblock patch

Patches Darkumbra.net to remove the need to disable your adblocker to view posted links.

  1. // ==UserScript==
  2. // @name Darkumbra anti-adblock patch
  3. // @namespace Darkumbra
  4. // @author 4channel Pirate
  5. // @description Patches Darkumbra.net to remove the need to disable your adblocker to view posted links.
  6. // @version 0.1
  7. // @grant none
  8. // @include https://darkumbra.net/forums/topic/*
  9. // @run-at document-start
  10. // ==/UserScript==
  11. var txtstr = /Adblock/i;
  12.  
  13. window.addEventListener('beforescriptexecute', function(e) {
  14. if(txtstr.test(e.target.text)){
  15. e.stopPropagation();
  16. e.preventDefault();
  17. revealContent();
  18. }
  19. }, true);
  20.  
  21. function revealContent() {
  22. var elems = document.querySelectorAll(".bimHiddenBox");
  23. [].forEach.call(elems, function(el) {
  24. el.classList.remove("ipsHide");
  25. });
  26. }