Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
RishiRecon
GitHub Repository: RishiRecon/exploits
Path: blob/main/misc/fake-virus/script.js
27424 views
1
$(document).ready(function(){
2
$(".demo").click(function(){
3
$(this).hide(200);
4
});
5
6
7
8
9
document.getElementById('timer').innerHTML = 59 + ":" + 59;
10
startTimer();
11
12
13
});
14
15
16
17
18
19
function startTimer() {
20
var presentTime = document.getElementById('timer').innerHTML;
21
var timeArray = presentTime.split(/[:]+/);
22
var m = timeArray[0];
23
var s = checkSecond((timeArray[1] - 1));
24
if(s==59){m=m-1}
25
26
if(m<0){m=1;}
27
28
document.getElementById('timer').innerHTML =
29
m + ":" + s;
30
setTimeout(startTimer, 1000);
31
}
32
33
function checkSecond(sec) {
34
if (sec < 10 && sec >= 0) {sec = "0" + sec}; // add zero in front of numbers < 10
35
if (sec < 0) {sec = "59"};
36
return sec;
37
}
38
39