Add loader UI component

This commit is contained in:
Cohee
2023-10-31 22:16:33 +02:00
parent eb4e90c589
commit a0706fcfc8
6 changed files with 46 additions and 5 deletions

View File

@ -185,6 +185,7 @@ import { applyLocale } from "./scripts/i18n.js";
import { getTokenCount, getTokenizerModel, initTokenizers, saveTokenCache } from "./scripts/tokenizers.js";
import { initPersonas, selectCurrentPersona, setPersonaDescription } from "./scripts/personas.js";
import { getBackgrounds, initBackgrounds } from "./scripts/backgrounds.js";
import { hideLoader, showLoader } from "./scripts/loader.js";
//exporting functions and vars for mods
export {
@ -258,6 +259,9 @@ export {
countOccurrences
}
// Cohee: Uncomment when we decide to use loader
// showLoader();
// Allow target="_blank" in links
DOMPurify.addHook('afterSanitizeAttributes', function (node) {
if ('target' in node) {
@ -729,6 +733,8 @@ async function firstLoadInit() {
initStats();
initCfg();
doDailyExtensionUpdatesCheck();
// Cohee: Uncomment when we decide to use loader
// hideLoader();
}
function checkOnlineStatus() {