-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
32 lines (24 loc) · 1.02 KB
/
script.js
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
excute = document.getElementById("excute");
excute.addEventListener('click', getData);
savedInfo = localStorage.getItem("zoomLinkList");
console.log(savedInfo)
function getData() {
//info for first website
name = document.getElementById("zoomname").value;
link = document.getElementById("zoomlink").value;
if(name != "" && link != ""){
if(savedInfo==null){
zoomInfo = String("Your Links<br><a href='"+link+"' target=_'blank'>"+name+"</a>")
} else{
zoomInfo = String(savedInfo+"<br>"+"<a href='"+link+"' target=_'blank'>"+name+"</a>")
console.log(zoomInfo)
}
localStorage.setItem("zoomLinkList", zoomInfo);
document.getElementById("linkDisplay").innerHTML = zoomInfo;
}
}
if(savedInfo==null){
document.getElementById("linkDisplay").innerHTML = "<p>Enter in a Zoom Link below</p>";
} else{
document.getElementById("linkDisplay").innerHTML = savedInfo;
}