in pysteve/www/htdocs/js/steve_rest.js [803:830]
function loadElection(election, uid, callback) {
var messages = ["Herding cats...", "Shaving yaks...", "Shooing some cows away...", "Fetching election data...", "Loading issues..."]
if (!election || !uid) {
var l = document.location.search.substr(1).split("/");
election = l[0];
uid = l.length > 1 ? l[l.length-1] : "";
}
if (step == -1) {
getJSON("/steve/voter/view/" + election + "?uid=" + uid, [election,uid, callback], displayElection)
}
var obj = document.getElementById('preloader');
step++;
if (!election_data && obj) {
if (step % 2 == 1) obj.innerHTML = messages[parseInt(Math.random()*messages.length-0.01)]
} else if (obj && (step % 2 == 1)) {
obj.innerHTML = "Ready..!"
}
if (step % 2 == 1 && obj) {
obj.style.transform = "translate(0,0)"
} else if (obj) {
obj.style.transform = "translate(0,-500%)"
}
if (!election_data|| (step % 2 == 0) ) {
window.setTimeout(loadElection, 750, election, uid, callback);
}
}