- renamed default expression folder

- split localStorage functions into separate js
This commit is contained in:
RossAsscends
2023-03-16 04:18:35 +09:00
parent 15f1d14db2
commit f558e12bda
32 changed files with 32 additions and 29 deletions

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -2,23 +2,25 @@ import { encode } from "../scripts/gpt-2-3-tokenizer/mod.js";
import {
Generate,
getSettings,
/* getSettings,
saveSettings,
printMessages,
clearChat,
getChat,
chat
settings, */
this_chid,
settings,
characters,
online_status,
main_api,
api_server,
api_key_novel,
getCharacters,
is_send_press,
chat
} from "../script.js";
import { LoadLocal, SaveLocal, ClearLocal, CheckLocal, LoadLocalBool } from "./f-localStorage.js";
var NavToggle = document.getElementById("nav-toggle");
var PanelPin = document.getElementById("rm_button_panel_pin");
var SelectedCharacterTab = document.getElementById("rm_button_selected_ch");
@ -39,30 +41,6 @@ var count_tokens;
var perm_tokens;
var ALC_Done;
////////////////// LOCAL STORAGE HANDLING /////////////////////
function SaveLocal(target, val) {
localStorage.setItem(target, val);
console.log('SaveLocal -- '+target+' : '+val);
}
function LoadLocal(target) {
return localStorage.getItem(target);
}
function LoadLocalBool(target){
let result = localStorage.getItem(target) === 'true';
return result;
}
function CheckLocal() {
console.log("----------local storage---------");
var i;
for (i = 0; i < localStorage.length; i++) {
console.log(localStorage.key(i) +" : " +localStorage.getItem(localStorage.key(i)));
}
console.log("------------------------------");
}
function ClearLocal() {localStorage.clear();console.log('Removed All Local Storage');}
/////////////////////////////////////////////////////////////////////////
//RossAscends: Added function to format dates used in files and chat timestamps to a humanized format.
//Mostly I wanted this to be for file names, but couldn't figure out exactly where the filename save code was as everything seemed to be connected.
//Does not break old characters/chats, as the code just uses whatever timestamp exists in the chat.

View File

@ -0,0 +1,25 @@
////////////////// LOCAL STORAGE HANDLING /////////////////////
export function SaveLocal(target, val) {
localStorage.setItem(target, val);
console.log('SaveLocal -- '+target+' : '+val);
}
export function LoadLocal(target) {
return localStorage.getItem(target);
}
export function LoadLocalBool(target){
let result = localStorage.getItem(target) === 'true';
return result;
}
export function CheckLocal() {
console.log("----------local storage---------");
var i;
for (i = 0; i < localStorage.length; i++) {
console.log(localStorage.key(i) +" : " +localStorage.getItem(localStorage.key(i)));
}
console.log("------------------------------");
}
export function ClearLocal() {localStorage.clear();console.log('Removed All Local Storage');}
/////////////////////////////////////////////////////////////////////////