teknoraver

keepurl

Mar 8th, 2021
564
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. function sanitizeNode(node) {
  3.     if (node.tagName != 'A')
  4.         return;
  5.  
  6.     node.removeAttribute('onmousedown');
  7. }
  8.  
  9. function walk(node) {
  10.     // thanks to: http://is.gd/mwZp7E
  11.     switch (node.nodeType) {
  12.         case  1: // Node.ELEMENT_NODE
  13.             sanitizeNode(node);
  14.         case  9: // Node.DOCUMENT_NODE
  15.         case 11: // Node.DOCUMENT_FRAGMENT_NODE
  16.             var child = node.firstChild;
  17.             while (child) {
  18.                 var next = child.nextSibling;
  19.                 walk(child);
  20.                 child = next;
  21.             }
  22.             break;
  23.     }
  24. }
  25.  
  26. walk(document.body);
  27.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×