Machi-chara appearance improved

main
Inga 🏳‍🌈 14 years ago
parent b94abe645a
commit 0f94dd2a5b
  1. 12
      static/js/machichara/simple.js
  2. 2
      templates/Full/elems/Main.xslt

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

@ -11,7 +11,7 @@
</link>
<link rel="shortcut icon" href="/static/favicons/smirk.ico" type="image/x-icon" />
<script language="Javascript" type="text/javascript" src="/static/js/common.js"><xsl:text> </xsl:text></script>
<script language="Javascript" type="text/javascript" src="/static/js/machichara/simple.js"><xsl:text> </xsl:text></script>
<script language="Javascript" type="text/javascript" src="/static/js/machichara/simple.js?v1"><xsl:text> </xsl:text></script>
<title>
<xsl:call-template name="specificTitle"/>
<xsl:text> - </xsl:text>

Loading…
Cancel
Save