summary refs log tree commit diff stats
path: root/tests/modules/mincludeprefix.nim
blob: 6d557a430f0370ea8e7d7b1e167577a7e7310d21 (plain) (blame)
1
const bar = 456
eral.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
"use strict";

var timer;
var prevIndex = 0;
var slideCount = 4;

function modifyActive(el, add) {
  var element = document.getElementById(el);
  if (add) {
    element.className = element.className + " active";
  }
  else {
    element.className = element.className.replace("active", "");
  }
}

function setSlideShow(index, short) {
  if (index >= slideCount) index = 0;
  modifyActive("slide" + prevIndex, false);
  modifyActive("slide" + index, true);
  modifyActive("slideControl" + prevIndex, false);
  modifyActive("slideControl" + index, true);
  prevIndex = index;
  startTimer(short ? 8000 : 32000);
}

function nextSlide() { setSlideShow(prevIndex + 1, true); }
function startTimer(t) { timer = setTimeout(nextSlide, t); }

function slideshow_enter() { clearTimeout(timer); }
function slideshow_exit () { startTimer(16000); }

function slideshow_click(index) {
  clearTimeout(timer);
  setSlideShow(index, false);
}

window.onload = function() {
  var slideshow = document.getElementById("slideshow");
  slideshow.onmouseenter = slideshow_enter;
  slideshow.onmouseleave = slideshow_exit;
  slideCount = slideshow.children.length;
  startTimer(8000);
};