Advertisement
IGhostxGamerI

Untitled

Oct 8th, 2022 (edited)
533
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /// thing.js
  2.  
  3. alert('loaded fsfs');
  4. /*
  5. var goob = {
  6.     '1': function() { // manual edit (on)
  7.         document.body.contentEditable = 'true';
  8.         document.designMode = 'on';
  9.     },
  10.     '2': function() { // manual edit (off)
  11.         document.body.contentEditable = 'false';
  12.         document.designMode = 'off';
  13.     },
  14.     //'3': function() { // auto replace
  15.         //var count=0;function htmlreplace(a,b,element){if(!element)element=document.body;var nodes=element.childNodes;for(var n=0;n<nodes.length;n++){   if(nodes[n].type&&nodes[n].type.toLowerCase()=='textarea'){      var r=new RegExp(a,'gim');      if(nodes[n].value.match(r)){        count++;      }      nodes[n].value=nodes[n].value.replace(r,b)    }    else if(nodes[n].nodeValue && nodes[n].nodeValue.length > 0){      var r=new RegExp(a,'gim');      if(nodes[n].nodeValue.match(r)){        count++;      }      nodes[n].nodeValue=nodes[n].nodeValue.replace(r,b)    }    else{      htmlreplace(a,b,nodes[n])    }  }}htmlreplace(prompt('find'),prompt('replace'));alert('replaced '+count+' words.');
  16.     //},
  17.     //'4': function() { // snake+
  18.         //req = new XMLHttpRequest(); req.open('GET', 'https://raw.githubusercontent.com/DarkSnakeGang/GoogleSnakeCustomMenuStuff/main/custom.js'); req.onload = function() { eval(this.responseText + 'snake.more_menu();'); }; req.send();
  19.     //}
  20. }
  21.  
  22. var shiftDown = false;
  23. window.onkeydown = function(key) {
  24.     alert('window onkeydown');
  25.     if (key.keyCode == 16) {
  26.         shiftDown = true;
  27.         alert('SHIFTDOWN TRUE');
  28.     } else if (shiftDown && key.keyCode == 192) {
  29.         var response = prompt('1: Manual Edit (On)\n2: Manual Edit (Off)\n3: Auto Replace\n4: Snake+');
  30.         if (response) {
  31.             goob[response]();
  32.             shiftDown = false;
  33.         }
  34.     }
  35. }
  36.  
  37. window.onkeyup = function(key) {
  38.     alert('window onkeyup');
  39.     if (key.keyCode == 16) {
  40.         alert('SHIFTDOWN FALSE');
  41.         shiftDown = false;
  42.     }
  43. }
  44. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement