mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Offline Downloader Fix
This commit is contained in:
@@ -2371,12 +2371,18 @@ function process_log_message(full_data) {
|
||||
//--------------------------------------------UI to Server Functions----------------------------------
|
||||
async function download_story_to_json() {
|
||||
//document.getElementById('download_iframe').src = 'json';
|
||||
try {
|
||||
let r = await fetch("json");
|
||||
let j = await r.json();
|
||||
downloadString(JSON.stringify(j), j['story_name']+".json")
|
||||
}
|
||||
catch(err) {
|
||||
downloaded = false;
|
||||
if (socket.connected) {
|
||||
try {
|
||||
let r = await fetch("json");
|
||||
let j = await r.json();
|
||||
downloadString(JSON.stringify(j), j['story_name']+".json")
|
||||
downloaded = true;
|
||||
}
|
||||
catch(err) {
|
||||
downloaded = false;
|
||||
}
|
||||
} if (downloaded == false) {
|
||||
//first we're going to find all the var_sync_story_ classes used in the document.
|
||||
let allClasses = [];
|
||||
const allElements = document.querySelectorAll('*');
|
||||
|
Reference in New Issue
Block a user