Skip to content

Instantly share code, notes, and snippets.

@markknol
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markknol/b246ce07e77bac8dab69 to your computer and use it in GitHub Desktop.
Save markknol/b246ce07e77bac8dab69 to your computer and use it in GitHub Desktop.
Trolling with others code. Never leave your computer.

instruction: look for condition in code like if (xx == yy) replace with if (xx = yy)

A really cool way to stop others messing with my code:

// Autogenerated, do not edit. All changes will be undone.

instruction: place somewhere in others code

fakes a waiting state

setTimeout(function() {document.body.style.cursor = 'wait';document.body.style.opacity = 0.5}, 128*128);

instruction: place somewhere in others code

function loopLength(a) { return { a: a }; }
for(var i = 0; loopLength(i); ++i) { alert(i); }

instruction: place somewhere in others code

document.addEventListener('touchstart', function(evt) {
  if (Math.random() > 0.95) evt.preventDefault();
});

instruction: place somewhere in others code

window.$ = null;

instruction: place somewhere in others code

hides errors after the first

window.onerror = function() { window.onerror = null; }

instruction: look for break-statement in a switch remove it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment