|
|
@ -1,10 +1,15 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function simpleMachicharaUpdater(element) { |
|
|
|
|
|
|
|
return function() { |
|
|
|
|
|
|
|
simpleMachicharaUpdate(element); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function simpleMachicharaUpdate(element) { |
|
|
|
function simpleMachicharaUpdate(element) { |
|
|
|
|
|
|
|
clearTimeout(element.interval); |
|
|
|
element.style.top = Math.floor(Math.random()*90) + "%"; |
|
|
|
element.style.top = Math.floor(Math.random()*90) + "%"; |
|
|
|
element.style.left = Math.floor(Math.random()*90) + "%"; |
|
|
|
element.style.left = Math.floor(Math.random()*90) + "%"; |
|
|
|
window.setTimeout(function() { |
|
|
|
element.interval = window.setTimeout(simpleMachicharaUpdater(element), 5000+Math.floor(Math.random()*25000)); |
|
|
|
simpleMachicharaUpdate(element); |
|
|
|
|
|
|
|
}, 5000+Math.floor(Math.random()*25000)); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function simpleMachichara(imageUrl) { |
|
|
|
function simpleMachichara(imageUrl) { |
|
|
@ -18,5 +23,6 @@ function simpleMachichara(imageUrl) { |
|
|
|
machicharaSimpleImageElement.src = imageUrl; |
|
|
|
machicharaSimpleImageElement.src = imageUrl; |
|
|
|
machicharaSimpleImageElement.style.border = "none"; |
|
|
|
machicharaSimpleImageElement.style.border = "none"; |
|
|
|
machicharaSimpleElement.appendChild(machicharaSimpleImageElement); |
|
|
|
machicharaSimpleElement.appendChild(machicharaSimpleImageElement); |
|
|
|
|
|
|
|
machicharaSimpleElement.onmouseover = simpleMachicharaUpdater(machicharaSimpleElement); |
|
|
|
simpleMachicharaUpdate(machicharaSimpleElement); |
|
|
|
simpleMachicharaUpdate(machicharaSimpleElement); |
|
|
|
} |
|
|
|
} |