User:Ditto Creeper Bot/common.js

$(function{   $('div#WikiaRail').prepend($(' ', {    ID: "railimage" })); // The Actual Count Down, this WAS SO ANNOYING but hey! I love helping. :3 $('#railimage').append($(' ', {    ID: "timedown" })); var timeclass = document.getElementById("timedown") , timedowncore = window.getComputedStyle(timeclass).getPropertyValue("content").replace(/(\"|<|>)/gm, ); // This is the title, editable through CSS. $('#railimage').append(' )/gm, ).split("|")[0] + "\">" + timedowncore.toString.replace(/(\"|<|>)/gm, '').split("|")[1] + " "); if (window.getComputedStyle(document.getElementById("timedown")).getPropertyValue("content").split("|")[2] !== undefined && timedowncore.split("|")[3] === undefined) {    var railimg = setInterval(function {        var elem = document.getElementById("railimage")          , theCSSprop = window.getComputedStyle(elem, null).getPropertyValue("content").toString , startprop = new Date(theCSSprop).getTime , endprop = new Date.getTime , minusProp = endprop - startprop , dayprop = Math.floor((minusProp / (1000 * 60 * 60 * 24))) , hourprop = Math.floor((minusProp % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)) , minuteprop = Math.floor((minusProp % (1000 * 60 * 60)) / (1000 * 60)) , secondprop = Math.floor((minusProp % (1000 * 60)) / 1000) , railtitle = window.getComputedStyle(timeclass).getPropertyValue("content"); $("#timedown").text("Time Left:" + dayprop + ":" + hourprop + ":" + minuteprop + ":" + secondprop); if (x <= 0) { clearInterval(railimg); $("#timedown")("It has begun!"); }   }, 1000); } else {    $("#timedown").text(timedowncore.split("|")[3]); } })