Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// thing.js
- alert('loaded fsfs');
- /*
- var goob = {
- '1': function() { // manual edit (on)
- document.body.contentEditable = 'true';
- document.designMode = 'on';
- },
- '2': function() { // manual edit (off)
- document.body.contentEditable = 'false';
- document.designMode = 'off';
- },
- //'3': function() { // auto replace
- //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.');
- //},
- //'4': function() { // snake+
- //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();
- //}
- }
- var shiftDown = false;
- window.onkeydown = function(key) {
- alert('window onkeydown');
- if (key.keyCode == 16) {
- shiftDown = true;
- alert('SHIFTDOWN TRUE');
- } else if (shiftDown && key.keyCode == 192) {
- var response = prompt('1: Manual Edit (On)\n2: Manual Edit (Off)\n3: Auto Replace\n4: Snake+');
- if (response) {
- goob[response]();
- shiftDown = false;
- }
- }
- }
- window.onkeyup = function(key) {
- alert('window onkeyup');
- if (key.keyCode == 16) {
- alert('SHIFTDOWN FALSE');
- shiftDown = false;
- }
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement