ya_sir commited on
Commit
3656b60
1 Parent(s): b0b3e56

Update main.js

Browse files
Files changed (1) hide show
  1. main.js +11 -7
main.js CHANGED
@@ -34,7 +34,8 @@ img.addEventListener("click", function() {
34
  let seedp = document.getElementById('seedp')
35
  let stepp = document.getElementById('stepp')
36
  let gdsp = document.getElementById('gdsp')
37
- let btn = document.getElementById('create')
 
38
  gd.addEventListener('input',()=>{
39
  gdsp.innerText = gd.value
40
  })
@@ -78,20 +79,22 @@ setTimeout(()=>{
78
  reload = true
79
  },2000000)
80
 
81
- btn.onclick = ()=>{
82
 
83
 
84
- if(btn.innerText == 'CANCEL'){
85
- window.location.reload()
86
- }
87
 
88
 
89
- }
 
 
90
 
91
 
92
 
93
  btn.onclick = async ()=>{
 
 
 
94
  btn.innerText = "CANCEL"
 
95
  let div = document.getElementById('imshow');
96
  if(reload==true){
97
  window.location.reload();
@@ -174,7 +177,8 @@ progress.value+=3},1100)
174
  img.src = imgData;
175
  div.appendChild(img);
176
  */
177
-
 
178
  const data = await response.json();
179
  localStorage.setItem("cookie", data.token);
180
  localStorage.setItem("sub", data.sub);
 
34
  let seedp = document.getElementById('seedp')
35
  let stepp = document.getElementById('stepp')
36
  let gdsp = document.getElementById('gdsp')
37
+ let btn = document.getElementById('create')
38
+ let cn = false
39
  gd.addEventListener('input',()=>{
40
  gdsp.innerText = gd.value
41
  })
 
79
  reload = true
80
  },2000000)
81
 
 
82
 
83
 
 
 
 
84
 
85
 
86
+
87
+
88
+
89
 
90
 
91
 
92
  btn.onclick = async ()=>{
93
+ if(cn==true){
94
+ window.location.reload()
95
+ }
96
  btn.innerText = "CANCEL"
97
+ cn = true
98
  let div = document.getElementById('imshow');
99
  if(reload==true){
100
  window.location.reload();
 
177
  img.src = imgData;
178
  div.appendChild(img);
179
  */
180
+ cn = false
181
+ btn.innerText = "CREATE"
182
  const data = await response.json();
183
  localStorage.setItem("cookie", data.token);
184
  localStorage.setItem("sub", data.sub);