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
0b6ba21f
Commit
0b6ba21f
authored
Mar 21, 2023
by
pythongosssss
Browse files
Added save image menu item
parent
aa2ddfab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
web/scripts/app.js
web/scripts/app.js
+17
-4
No files found.
web/scripts/app.js
View file @
0b6ba21f
...
@@ -80,10 +80,23 @@ class ComfyApp {
...
@@ -80,10 +80,23 @@ class ComfyApp {
img
=
this
.
imgs
[
this
.
overIndex
];
img
=
this
.
imgs
[
this
.
overIndex
];
}
}
if
(
img
)
{
if
(
img
)
{
options
.
unshift
({
options
.
unshift
(
content
:
"
Open Image
"
,
{
callback
:
()
=>
window
.
open
(
img
.
src
,
"
_blank
"
),
content
:
"
Open Image
"
,
});
callback
:
()
=>
window
.
open
(
img
.
src
,
"
_blank
"
),
},
{
content
:
"
Save Image
"
,
callback
:
()
=>
{
const
a
=
document
.
createElement
(
"
a
"
);
a
.
href
=
img
.
src
;
a
.
setAttribute
(
"
download
"
,
new
URLSearchParams
(
new
URL
(
img
.
src
).
search
).
get
(
"
filename
"
));
document
.
body
.
append
(
a
);
a
.
click
();
requestAnimationFrame
(()
=>
a
.
remove
());
},
}
);
}
}
}
}
};
};
...
...
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