From 0e965b8e3b1f693441d9d400537b6028f6a4eed2 Mon Sep 17 00:00:00 2001 From: Michiel Scholten Date: Mon, 4 Nov 2024 21:04:00 +0100 Subject: [PATCH] Removed old JS files --- src/alfagok/static/copy.js | 10 ---------- src/alfagok/static/countdown.js | 23 ----------------------- src/alfagok/templates/index.html | 2 -- 3 files changed, 35 deletions(-) delete mode 100644 src/alfagok/static/copy.js delete mode 100644 src/alfagok/static/countdown.js diff --git a/src/alfagok/static/copy.js b/src/alfagok/static/copy.js deleted file mode 100644 index ec5e4d8..0000000 --- a/src/alfagok/static/copy.js +++ /dev/null @@ -1,10 +0,0 @@ -var clip = new Clipboard('.copy'); - -clip.on("success", function(e) { - document.getElementById('copyresults').innerHTML = '

Gekopieerd! Deel je resultaat.

'; - e.clearSelection(); -}); - -clip.on("error", function() { - document.getElementById('copyresults').innerHTML = '

Fout. Graag handmatig kopiëren...

'; -}); diff --git a/src/alfagok/static/countdown.js b/src/alfagok/static/countdown.js deleted file mode 100644 index bfc68e3..0000000 --- a/src/alfagok/static/countdown.js +++ /dev/null @@ -1,23 +0,0 @@ -/* Original from alphaguess.com */ - -function go() { - window.timerID = window.setInterval(timer, 0); -} - -function timer(){ - var nextgame = document.getElementById('nextgame'); - var now = new Date(); - var midnight = new Date(now.getFullYear(), now.getMonth(), now.getDate()+1, 0, 0, 0); - var diff = Math.floor((midnight - now)/1000); - var hoursRemain = Math.floor(diff/(60*60)); - var minutesRemain = Math.floor((diff-hoursRemain*60*60)/60); - var secondsRemain = Math.floor(diff%60); - nextgame.innerHTML = ''+addZero(hoursRemain)+':'+addZero(minutesRemain)+':'+addZero(secondsRemain)+' over'; -} - -function addZero(num){ - if(num <=9) return '0'+num; - else return num; -} - -go(); diff --git a/src/alfagok/templates/index.html b/src/alfagok/templates/index.html index 2c32be9..9dbf125 100644 --- a/src/alfagok/templates/index.html +++ b/src/alfagok/templates/index.html @@ -97,8 +97,6 @@ - {# - #}