kompose/docs/js/icons.js
Charlie Drage 597e7b0fdc
Add new kompose site (#1475)
Adds the new kompose site and moves it to the /docs folder so that it's
compatible with old links as well as gh-pages
2022-01-13 14:05:38 -05:00

32 lines
612 B
JavaScript

var icons = [
'r6',
'daytona',
'zx6r',
'gsxr',
'cbr600rr'
]
var container = document.querySelector('.icons')
function spawn() {
var icon = icons[Math.floor(Math.random() * icons.length)]
var img = document.createElement("IMG")
img.style.right = 25 + Math.random() * 50 + '%'
img.setAttribute('class', 'icon')
img.setAttribute("src", 'img/icons/' + icon + ".png")
container.appendChild(img)
setTimeout(function() {
container.removeChild(img)
}, 3000)
}
setTimeout(function run() {
spawn()
setTimeout(run, 1300 + Math.random() * 400)
}, 1300 + Math.random() * 400)
spawn()