-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChangeTxt.js
More file actions
56 lines (49 loc) · 1.59 KB
/
Copy pathChangeTxt.js
File metadata and controls
56 lines (49 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
function Change() {
ClickSpeed = 2
document.getElementById("maintext").innerHTML = "Whoa!"
document.getElementById("buttontext").innerHTML = "You pressed me!"
document.getElementById("top").innerHTML = "Click the button at the botom to change the ttext below!"
newText = "<u>Updated Wow!</u>"
}
//prompt("Hi, enter absolutely anything, I really don't care")
let k = false;
let b = new Date();
b.setTime(b.getTime()+(30*24*60*60*1000))
function IncrementCookie(){
document.cookie = document.cookie = "clicks="+(clicks+ClickSpeed)+"; expires="+b.toUTCString()+"; path=/";
clicks= Number(clicks)+ClickSpeed
}
if (document.cookie.includes("clicks=")==false){
document.cookie = "clicks=0; expires="+b.toUTCString()+"; path=/";
}
let clicks = Number(document.cookie.match(/\d+/))
console.log(document.cookie.match(/\d+/))
let newText= "<b>Well... </b>"
let ClickSpeed = 1
function Reset(){
document.cookie = "clicks=0; expires="+b.toUTCString()+"; path=/"
clicks=0
}
function ShowCookie(){
alert(document.cookie)
}
function AddCookie(){
document.cookie = "seen=True; expires="+b.toUTCString()+"; path=/"
}
function DeleteCookie(){
document.cookie = "seen=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"
}
function SwitchVar(){
IncrementCookie()
alert(document.cookie)
/*if (confirm("Are you sure?") == false) {
return 0;
}
*/
if (k==true ) {
document.getElementById("buttonsubmit").innerHTML = newText
k=false
} else {
document.getElementById("buttonsubmit").innerHTML = "<em>Whooa</em>"
k=true
}}