mirror of
https://github.com/aquatix/alfagok.git
synced 2025-12-06 22:15:11 +01:00
var-b-let
This commit is contained in:
@@ -135,7 +135,7 @@ function getFormattedTime(milliseconds) {
|
|||||||
|
|
||||||
/* Clipboard stuff **/
|
/* Clipboard stuff **/
|
||||||
|
|
||||||
var clip = new Clipboard('.copy');
|
let clip = new Clipboard('.copy');
|
||||||
|
|
||||||
clip.on("success", function(e) {
|
clip.on("success", function(e) {
|
||||||
document.getElementById('copyresults').innerHTML = '<p style="font-size:var(--small);opacity:50%">Gekopieerd! Deel je resultaat.</p>';
|
document.getElementById('copyresults').innerHTML = '<p style="font-size:var(--small);opacity:50%">Gekopieerd! Deel je resultaat.</p>';
|
||||||
@@ -154,13 +154,13 @@ function go() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function timer(){
|
function timer(){
|
||||||
var nextgame = document.getElementById('nextgame');
|
let nextgame = document.getElementById('nextgame');
|
||||||
var now = new Date();
|
let now = new Date();
|
||||||
var midnight = new Date(now.getFullYear(), now.getMonth(), now.getDate()+1, 0, 0, 0);
|
let midnight = new Date(now.getFullYear(), now.getMonth(), now.getDate()+1, 0, 0, 0);
|
||||||
var diff = Math.floor((midnight - now)/1000);
|
let diff = Math.floor((midnight - now)/1000);
|
||||||
var hoursRemain = Math.floor(diff/(60*60));
|
let hoursRemain = Math.floor(diff/(60*60));
|
||||||
var minutesRemain = Math.floor((diff-hoursRemain*60*60)/60);
|
let minutesRemain = Math.floor((diff-hoursRemain*60*60)/60);
|
||||||
var secondsRemain = Math.floor(diff%60);
|
let secondsRemain = Math.floor(diff%60);
|
||||||
nextgame.innerHTML = '<span class="nextgame">'+addZero(hoursRemain)+':'+addZero(minutesRemain)+':'+addZero(secondsRemain)+' over</span>';
|
nextgame.innerHTML = '<span class="nextgame">'+addZero(hoursRemain)+':'+addZero(minutesRemain)+':'+addZero(secondsRemain)+' over</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user