yasir
commited on
Commit
•
34225fe
1
Parent(s):
7a435a0
Update main.js
Browse files
main.js
CHANGED
@@ -77,8 +77,7 @@ img.addEventListener("click", function() {
|
|
77 |
|
78 |
btn.onclick = async ()=>{
|
79 |
|
80 |
-
|
81 |
-
|
82 |
|
83 |
isimg = false
|
84 |
let isc = false
|
@@ -90,16 +89,27 @@ img.addEventListener("click", function() {
|
|
90 |
|
91 |
negative_prompt = nps
|
92 |
btn.disabled = true
|
93 |
-
let div = document.getElementById('imshow');
|
94 |
div.innerHTML = '';
|
95 |
document.getElementById('imshow').innerHTML = ''
|
96 |
-
let pi = document.createElement('
|
97 |
pi.innerText = 'Generating Image... Estimated Time: 20s'
|
98 |
-
|
99 |
let count = 0;
|
100 |
seed = seed
|
101 |
|
102 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
async function generate(){
|
104 |
cookie = localStorage.getItem("cookie")
|
105 |
u = localStorage.getItem("u")
|
@@ -153,7 +163,8 @@ img.addEventListener("click", function() {
|
|
153 |
localStorage.setItem("sub", data.sub);
|
154 |
localStorage.setItem("u", data.u);
|
155 |
console.log(data.result)
|
156 |
-
|
|
|
157 |
const img = document.createElement('img');
|
158 |
img.id = "hehe"
|
159 |
pi.innerHTML = ''
|
|
|
77 |
|
78 |
btn.onclick = async ()=>{
|
79 |
|
80 |
+
let div = document.getElementById('imshow');
|
|
|
81 |
|
82 |
isimg = false
|
83 |
let isc = false
|
|
|
89 |
|
90 |
negative_prompt = nps
|
91 |
btn.disabled = true
|
|
|
92 |
div.innerHTML = '';
|
93 |
document.getElementById('imshow').innerHTML = ''
|
94 |
+
let pi = document.createElement('h5')
|
95 |
pi.innerText = 'Generating Image... Estimated Time: 20s'
|
96 |
+
// document.getElementById('imshow').append(pi)
|
97 |
let count = 0;
|
98 |
seed = seed
|
99 |
|
100 |
|
101 |
+
|
102 |
+
|
103 |
+
let progress = document.createElement('progress');
|
104 |
+
progress.value = 1;
|
105 |
+
progress.max = 100;
|
106 |
+
|
107 |
+
div.appendChild(progress);
|
108 |
+
setInterval(()=>{
|
109 |
+
progress.value+=3},1100)
|
110 |
+
|
111 |
+
|
112 |
+
|
113 |
async function generate(){
|
114 |
cookie = localStorage.getItem("cookie")
|
115 |
u = localStorage.getItem("u")
|
|
|
163 |
localStorage.setItem("sub", data.sub);
|
164 |
localStorage.setItem("u", data.u);
|
165 |
console.log(data.result)
|
166 |
+
progress.innerHTML = ''
|
167 |
+
progress.style.display = 'none';
|
168 |
const img = document.createElement('img');
|
169 |
img.id = "hehe"
|
170 |
pi.innerHTML = ''
|