Clear all link
Set as browser bookmark. Use when angry.
by markokristian
HTML
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
JavaScript
(function() {
$('*').remove();
var id = "1";
document.write('<div id="' + id + '">INTERNET GONE!</div>');
var $msg = $('#' + id);
var css = {
'text-align': 'center',
'font-size': '3em',
'margin-top': '0px',
'color': '#772323',
'position': 'relative',
};
for (var k in css) {
$msg.css(k, css[k]);
}
var y = 0;
var x = 0;
var vy = +1;
var vx = +1;
var limit = 400;
function animate() {
setInterval(function() {
$msg.css('margin-top', y);
$msg.css('margin-left', x);
if (y >= limit) {
vy = -1;
}
if (y <= 0) {
vy = +1;
}
if (x <= 0) {
vx = +1;
}
if (x >= limit) {
vx = -1;
}
y += vy;
x += vx;
}, 10);
}
animate();
})();