mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Now refreshes the browser when reconnecting to socketio
This commit is contained in:
@@ -80,6 +80,7 @@ var generating_summary = false;
|
|||||||
const on_colab = $el("#on_colab").textContent == "true";
|
const on_colab = $el("#on_colab").textContent == "true";
|
||||||
let story_id = -1;
|
let story_id = -1;
|
||||||
var dirty_chunks = [];
|
var dirty_chunks = [];
|
||||||
|
var initial_socketio_connection_occured = false;
|
||||||
|
|
||||||
// Each entry into this array should be an object that looks like:
|
// Each entry into this array should be an object that looks like:
|
||||||
// {class: "class", key: "key", func: callback}
|
// {class: "class", key: "key", func: callback}
|
||||||
@@ -218,6 +219,10 @@ var current_action;
|
|||||||
function connect() {
|
function connect() {
|
||||||
console.log("connected");
|
console.log("connected");
|
||||||
//reset_story();
|
//reset_story();
|
||||||
|
if (initial_socketio_connection_occured) {
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
|
initial_socketio_connection_occured = true;
|
||||||
for (item of document.getElementsByTagName("body")) {
|
for (item of document.getElementsByTagName("body")) {
|
||||||
item.classList.remove("NotConnected");
|
item.classList.remove("NotConnected");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user