2021-02-27 05:39:40 +00:00
|
|
|
/*
|
|
|
|
Death of Internet Explorer Javascript program
|
|
|
|
http://swagg.net/
|
|
|
|
inspiration: https://www.w3schools.com/howto/howto_js_countdown.asp
|
|
|
|
|
|
|
|
Copyright 2020 Daniel Bowling <swaggboi@slackware.uk>
|
|
|
|
All rights reserved.
|
|
|
|
|
|
|
|
Redistribution and use of this script, with or without modification, is
|
|
|
|
permitted provided that the following conditions are met:
|
|
|
|
|
|
|
|
1. Redistributions of this script must retain the above copyright
|
|
|
|
notice, this list of conditions and the following disclaimer.
|
|
|
|
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
|
|
|
|
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
|
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
|
|
|
EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
|
|
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
|
|
|
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
|
|
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
|
|
|
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
|
|
|
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
// Set the date we're counting down to
|
2021-11-21 06:05:43 +00:00
|
|
|
var countDownDate = new Date("Jun 15, 2022 00:00:00").getTime();
|
2021-02-27 05:39:40 +00:00
|
|
|
|
2021-08-13 18:11:43 +00:00
|
|
|
// Update the count down every 1 second (var x is needed for
|
|
|
|
// clearInterval() later)
|
2021-08-13 18:10:31 +00:00
|
|
|
var x = setInterval(function () {
|
2021-08-12 15:56:42 +00:00
|
|
|
// Get today's date and time
|
|
|
|
var now = new Date().getTime();
|
|
|
|
|
|
|
|
// Find the distance between now and the count down date
|
|
|
|
var distance = countDownDate - now;
|
|
|
|
|
|
|
|
// Time calculations for days, hours, minutes and seconds
|
|
|
|
var days = Math.floor(distance / (1000 * 60 * 60 * 24));
|
|
|
|
var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) /
|
|
|
|
(1000 * 60 * 60));
|
|
|
|
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
|
|
|
|
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
|
|
|
|
|
|
|
|
// Display the result in the element with id="dethKlok"
|
|
|
|
document.getElementById("dethKlok").innerHTML = days + "d " + hours + "h " +
|
|
|
|
minutes + "m " + seconds + "s ";
|
|
|
|
|
|
|
|
// If the count down is finished, write some text
|
|
|
|
if (distance < 0) {
|
|
|
|
clearInterval(x);
|
|
|
|
document.getElementById("dethKlok").innerHTML =
|
2021-11-21 06:05:43 +00:00
|
|
|
"DONE. Deprecated as of Jun 15, 2022 💀";
|
2021-08-12 15:56:42 +00:00
|
|
|
}
|
2021-02-27 05:39:40 +00:00
|
|
|
}, 1000);
|