Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="countdown-stage">Please enable JavaScript to see the stage timer.</div>
- <script>
- console.log("31337 haxed by xen0n");
- var countTo = 0
- function messageUpdate(msg) {
- document.getElementById("countdown-stage").innerHTML = msg;
- }
- var mess = "Please wait"
- messageUpdate(mess);
- function findCountTo() {
- currentTime = new Date();
- hrs = currentTime.getUTCHours();
- if (hrs >= 0 && hrs < 2) {
- countTo = 2
- }
- if (hrs >= 2 && hrs < 6) {
- countTo = 6
- }
- if (hrs >= 6 && hrs < 10) {
- countTo = 10
- }
- if (hrs >= 10 && hrs < 14) {
- countTo = 14
- }
- if (hrs >= 14 && hrs < 18) {
- countTo = 18
- }
- if (hrs >= 18 && hrs < 22) {
- countTo = 22
- }
- if (hrs >= 22) {
- countTo = 2
- }
- }
- findCountTo();
- function update() {
- currentTime = new Date();
- hrs = currentTime.getUTCHours();
- mins = currentTime.getUTCMinutes();
- secs = currentTime.getUTCSeconds();
- var showHrs = countTo - hrs - 1
- var showMins = 60 - mins
- if (hrs < countTo) {
- mess = "Stages will update in " + parseInt(showHrs) + " hours " + parseInt(showMins) + " minutes " + parseInt(60 - secs) + " seconds"
- }
- if (hrs == countTo) {
- mess = "The stages have been updated!"
- findCountTo();
- }
- messageUpdate(mess);
- }
- setInterval(update, 1000);
- </script>
Advertisement
Add Comment
Please, Sign In to add comment