Skip to main content
fixed double quiotes
Source Link
Ryan
  • 180
  • 13

Javascript, cut and paste into console (chrome browser of course) on this page to see the page disappear!

function pad_with_zeroes(number, length){ var my_string = '' + number; while (my_string.length < length){ my_string = '0' + my_string; } return my_string; } var code_tags = document.getElementsByTagName("code"'code'); var hello_world = code_tags[0].innerHTML; var body_tags = document.getElementsByTagName("body"'body'); var body = "NULL";'NULL'; body = body_tags[0]; var html_input = "<div id='div_that_holds_hello_world' style='font-size:50px; color:#987324; width: 900px; height: 900px; text-align: center;'><span id='hello_world_span'>" +hello_world+ "</span></div>"; body.innerHTML = html_input; var span = document.getElementById("hello_world_span"'hello_world_span'); var div = document.getElementById("div_that_holds_hello_world"'div_that_holds_hello_world'); var j_c = 1; var i_c = 0; var setIn = setInterval(function(){ i_c++; if(i_c%2 == 0){ span.style.display = "none";'none'; }else{ span.style.display = "block";'block'; } if(i_c%50 != 0){ div.style.fontSize = j_c + 'px'; if(i_c < 1000000){ div.style.color = "#"+'#'+ pad_with_zeroes(i_c, 6); }else{ i_c = 0; } j_c++; }else{ j_c = 0; } }, 500); 

Javascript, cut and paste into console (chrome browser of course) on this page to see the page disappear!

function pad_with_zeroes(number, length){ var my_string = '' + number; while (my_string.length < length){ my_string = '0' + my_string; } return my_string; } var code_tags = document.getElementsByTagName("code"); var hello_world = code_tags[0].innerHTML; var body_tags = document.getElementsByTagName("body"); var body = "NULL"; body = body_tags[0]; var html_input = "<div id='div_that_holds_hello_world' style='font-size:50px; color:#987324; width: 900px; height: 900px; text-align: center;'><span id='hello_world_span'>" +hello_world+ "</span></div>"; body.innerHTML = html_input; var span = document.getElementById("hello_world_span"); var div = document.getElementById("div_that_holds_hello_world"); var j_c = 1; var i_c = 0; var setIn = setInterval(function(){ i_c++; if(i_c%2 == 0){ span.style.display = "none"; }else{ span.style.display = "block"; } if(i_c%50 != 0){ div.style.fontSize = j_c + 'px'; if(i_c < 1000000){ div.style.color = "#"+ pad_with_zeroes(i_c, 6); }else{ i_c = 0; } j_c++; }else{ j_c = 0; } }, 500); 

Javascript, cut and paste into console (chrome browser of course) on this page to see the page disappear!

function pad_with_zeroes(number, length){ var my_string = '' + number; while (my_string.length < length){ my_string = '0' + my_string; } return my_string; } var code_tags = document.getElementsByTagName('code'); var hello_world = code_tags[0].innerHTML; var body_tags = document.getElementsByTagName('body'); var body = 'NULL'; body = body_tags[0]; var html_input = "<div id='div_that_holds_hello_world' style='font-size:50px; color:#987324; width: 900px; height: 900px; text-align: center;'><span id='hello_world_span'>" +hello_world+ "</span></div>"; body.innerHTML = html_input; var span = document.getElementById('hello_world_span'); var div = document.getElementById('div_that_holds_hello_world'); var j_c = 1; var i_c = 0; var setIn = setInterval(function(){ i_c++; if(i_c%2 == 0){ span.style.display = 'none'; }else{ span.style.display = 'block'; } if(i_c%50 != 0){ div.style.fontSize = j_c + 'px'; if(i_c < 1000000){ div.style.color = '#'+ pad_with_zeroes(i_c, 6); }else{ i_c = 0; } j_c++; }else{ j_c = 0; } }, 500); 
Source Link
Ryan
  • 180
  • 13

Javascript, cut and paste into console (chrome browser of course) on this page to see the page disappear!

function pad_with_zeroes(number, length){ var my_string = '' + number; while (my_string.length < length){ my_string = '0' + my_string; } return my_string; } var code_tags = document.getElementsByTagName("code"); var hello_world = code_tags[0].innerHTML; var body_tags = document.getElementsByTagName("body"); var body = "NULL"; body = body_tags[0]; var html_input = "<div id='div_that_holds_hello_world' style='font-size:50px; color:#987324; width: 900px; height: 900px; text-align: center;'><span id='hello_world_span'>" +hello_world+ "</span></div>"; body.innerHTML = html_input; var span = document.getElementById("hello_world_span"); var div = document.getElementById("div_that_holds_hello_world"); var j_c = 1; var i_c = 0; var setIn = setInterval(function(){ i_c++; if(i_c%2 == 0){ span.style.display = "none"; }else{ span.style.display = "block"; } if(i_c%50 != 0){ div.style.fontSize = j_c + 'px'; if(i_c < 1000000){ div.style.color = "#"+ pad_with_zeroes(i_c, 6); }else{ i_c = 0; } j_c++; }else{ j_c = 0; } }, 500);