forked from imtumbleweed/primary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
popup.js
30 lines (24 loc) · 879 Bytes
/
popup.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
const firstPopup = document.getElementById("firstPopup");
const secondPopup = document.getElementById("secondPopup");
//buttons
const openPopup = document.getElementById("openPopup");
const tweet = document.getElementById('tweet');
const closeSpan = document.getElementsByClassName("close")[0];
const yesButton = document.getElementsByClassName('yes')[0];
const noButton = document.getElementsByClassName('no')[0];
openPopup.addEventListener('click', ()=>{
firstPopup.style.display = "block";
})
tweet.addEventListener('click', ()=>{
firstPopup.style.display = 'none';
});
closeSpan.addEventListener('click', ()=>{
secondPopup.style.display = "block";
})
yesButton.addEventListener('click', ()=>{
secondPopup.style.display ='none';
firstPopup.style.display = 'none';
})
noButton.addEventListener('click', ()=>{
secondPopup.style.display ="none";
})