diff --git a/aiserver.py b/aiserver.py
index 77032708..956e0374 100644
--- a/aiserver.py
+++ b/aiserver.py
@@ -6374,7 +6374,15 @@ def UI_2_submit(data):
koboldai_vars.lua_koboldbridge.feedback = None
koboldai_vars.recentrng = koboldai_vars.recentrngm = None
actionsubmit(data['data'], actionmode=koboldai_vars.actionmode)
-
+
+ #==================================================================#
+# Event triggered when user clicks the submit button
+#==================================================================#
+@socketio.on('abort')
+def UI_2_abort(data):
+ koboldai_vars.abort = True
+
+
#==================================================================#
# Event triggered when user clicks the pin button
#==================================================================#
diff --git a/templates/index_new.html b/templates/index_new.html
index f25b7fa8..80c27948 100644
--- a/templates/index_new.html
+++ b/templates/index_new.html
@@ -52,7 +52,7 @@
-
+