Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
e6aa9f0c
Commit
e6aa9f0c
authored
Jan 27, 2023
by
comfyanonymous
Browse files
Modal now actually shows up on colab.
parent
88d0f4b3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
17 deletions
+11
-17
webshit/index.html
webshit/index.html
+11
-17
No files found.
webshit/index.html
View file @
e6aa9f0c
...
...
@@ -8,7 +8,7 @@
.modal
{
display
:
none
;
/* Hidden by default */
position
:
fixed
;
/* Stay in place */
z-index
:
1
;
/* Sit on top */
z-index
:
1
00
;
/* Sit on top */
left
:
50%
;
/* Center the modal horizontally */
top
:
50%
;
/* Center the modal vertically */
transform
:
translate
(
-50%
,
-50%
);
/* Use this to center the modal */
...
...
@@ -45,7 +45,7 @@
margin-bottom
:
20px
;
/* Add some margin between the text and the close button*/
}
</style>
<div
id=
"myModal"
class=
"modal"
>
<div
id=
"my
Error
Modal"
class=
"modal"
>
<div
class=
"modal-content"
>
<p
id=
"modal-text"
></p>
<span
class=
"close"
>
CLOSE
</span>
...
...
@@ -314,30 +314,24 @@ function graphToPrompt() {
return
output
;
}
function
showModal
(
text
)
{
var
modal
=
document
.
getElementById
(
"
myModal
"
);
var
modalText
=
document
.
getElementById
(
"
modal-text
"
);
modalText
.
innerHTML
=
text
;
modal
.
style
.
display
=
"
block
"
;
}
function
closeModal
()
{
var
modal
=
document
.
getElementById
(
"
myModal
"
);
var
modal
=
document
.
getElementById
(
"
my
Error
Modal
"
);
modal
.
style
.
display
=
"
none
"
;
}
var
closeBtn
=
document
.
getElementsByClassName
(
"
close
"
)[
0
];
closeBtn
.
onclick
=
closeModal
;
window
.
onclick
=
function
(
event
)
{
if
(
event
.
target
==
modal
)
{
closeModal
();
}
function
showModal
(
text
)
{
var
modal
=
document
.
getElementById
(
"
myErrorModal
"
);
var
modalText
=
document
.
getElementById
(
"
modal-text
"
);
modalText
.
innerHTML
=
text
;
modal
.
style
.
display
=
"
block
"
;
var
closeBtn
=
modal
.
getElementsByClassName
(
"
close
"
)[
0
];
closeBtn
.
onclick
=
function
(
event
)
{
closeModal
();}
}
function
promptPosted
(
data
)
{
if
(
data
.
status
=
=
4
00
)
{
if
(
data
.
status
!
=
2
00
)
{
data
.
text
().
then
(
dt
=>
showModal
(
dt
));
return
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment