v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

User:HebaruSan/monobook.js

From Dwarf Fortress Wiki
< User:HebaruSan
Revision as of 19:06, 25 October 2009 by HebaruSan (talk | contribs) (typo)
Jump to navigation Jump to search

Note: After saving, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files
var animTimer = 0;
var animations = new Array();
var current = new Array();

function initAnim(name,count) {
 /* Attempt re-entrancy. */
 if (!animTimer) {
  setTimeout("doAnim();", 250);
  animTimer = 1;
 }
 animations[name] = count;
 current[name] = 0;
}

/* Change each animated cell to its next character */
function doAnim() {
 var a;
 for (a in animations) {
  var prev_id = a + "_" + current[a];
  var prev_elt = document.getElementById(prev_id);
  prev_elt.style.display = "none";
  if (current[a] < animations[a]) {
   ++current[a];
  } else {
   current[a] = 0;
  }
  var next_id = a + "_" + current[a];
  var next_elt = document.getElementById(next_id);
  next_elt.style.display = "";
 }
 setTimeout("doAnim();", 250);
}