2024-09-23 01:44:59 +00:00
|
|
|
window.onload = function() {
|
|
|
|
var $app = document.getElementById('app');
|
|
|
|
var $loading = document.getElementById('loading');
|
|
|
|
$app.removeChild($loading);
|
|
|
|
var $button = document.createElement('button');
|
|
|
|
var $h1 = document.createElement('h1');
|
|
|
|
$app.appendChild($h1);
|
|
|
|
$app.appendChild($button);
|
|
|
|
|
2024-09-23 04:39:29 +00:00
|
|
|
$h1.textContent = '~Protevus HTTP/2 server push~';
|
2024-09-23 01:44:59 +00:00
|
|
|
|
|
|
|
$button.textContent = 'Change color';
|
|
|
|
$button.onclick = function() {
|
|
|
|
var color = Math.floor(Math.random() * 0xffffff);
|
|
|
|
$h1.style.color = '#' + color.toString(16);
|
|
|
|
};
|
|
|
|
|
|
|
|
$button.onclick();
|
|
|
|
|
|
|
|
window.setInterval($button.onclick, 2000);
|
|
|
|
|
|
|
|
var rotation = 0;
|
|
|
|
window.setInterval(function() {
|
|
|
|
rotation += .6;
|
|
|
|
$button.style.transform = 'rotate(' + rotation + 'deg)';
|
|
|
|
}, 10);
|
|
|
|
};
|