Skip to content

Instantly share code, notes, and snippets.

@mtomwing
Created April 2, 2014 21:27
Show Gist options
  • Save mtomwing/9943531 to your computer and use it in GitHub Desktop.
Save mtomwing/9943531 to your computer and use it in GitHub Desktop.
$.ready(function() {
function randint(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function katamari() {
$('body').append($('<script/>', {src: 'http://kathack.com/js/kh.js'}));
setTimeout(function () {
console.log('poop');
$('#loadingp button').click();
}, 2000);
};
function upside_down() {
$('body *').each(function () {
if (!randint(0, 10)) {
$(this).css('-webkit-transform', 'rotate(180deg)');
$(this).css('-moz-transform', 'rotate(180deg)');
$(this).css('-ms-transform', 'rotate(180deg)');
$(this).css('-o-transform', 'rotate(180deg)');
$(this).css('transform', 'rotate(180deg)');
};
});
};
function disable_xss_delete() {
$('td button').each(function () {
if ($(this).parents('tr')[0].innerHTML.indexOf('<script>') != -1) {
$(this).prop( "onclick", null )
}
});
};
// Shenanigans.main()
disable_xss_delete();
upside_down();
switch(randint(1, 10)) {
case 1:
katamari();
break;
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment