aboutsummaryrefslogtreecommitdiff
path: root/javascript/ui.js
diff options
context:
space:
mode:
Diffstat (limited to 'javascript/ui.js')
-rw-r--r--javascript/ui.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/javascript/ui.js b/javascript/ui.js
index f94ed081..b1053201 100644
--- a/javascript/ui.js
+++ b/javascript/ui.js
@@ -218,10 +218,16 @@ function update_token_counter(button_id) {
clearTimeout(token_timeout);
token_timeout = setTimeout(() => gradioApp().getElementById(button_id)?.click(), wait_time);
}
+
function submit_prompt(event, generate_button_id) {
if (event.altKey && event.keyCode === 13) {
event.preventDefault();
gradioApp().getElementById(generate_button_id).click();
return;
}
-} \ No newline at end of file
+}
+
+function restart_reload(){
+ document.body.innerHTML='<h1 style="font-family:monospace;margin-top:20%;color:lightgray;text-align:center;">Reloading...</h1>';
+ setTimeout(function(){location.reload()},2000)
+}