Merge pull request #1228 from Tony-sama/staging

This commit is contained in:
Cohee 2023-10-10 09:41:02 +03:00 committed by GitHub
commit 3f406dcdf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -0,0 +1 @@
Put blip audio files here

View File

@ -1,8 +1,7 @@
/*
TODO:
- Check failed install file (0kb size ?)
*/
//const DEBUG_TONY_SAMA_FORK_MODE = false
//const DEBUG_TONY_SAMA_FORK_MODE = true
import { getRequestHeaders, callPopup } from "../../../script.js";
import { deleteExtension, extensionNames, installExtension } from "../../extensions.js";
@ -62,7 +61,7 @@ function downloadAssetsList(url) {
element.append(label);
//if (DEBUG_TONY_SAMA_FORK_MODE)
// assetUrl = assetUrl.replace("https://github.com/SillyTavern/","https://github.com/Tony-sama/"); // DBG
// asset["url"] = asset["url"].replace("https://github.com/SillyTavern/","https://github.com/Tony-sama/"); // DBG
console.debug(DEBUG_PREFIX, "Checking asset", asset["id"], asset["url"]);
@ -117,7 +116,7 @@ function downloadAssetsList(url) {
element.on("click", assetInstall);
}
console.debug(DEBUG_PREFIX, "Created element for BGM", asset["id"])
console.debug(DEBUG_PREFIX, "Created element for ", asset["id"])
const displayName = DOMPurify.sanitize(asset["name"] || asset["id"]);
const description = DOMPurify.sanitize(asset["description"] || "");

View File

@ -5,7 +5,7 @@ const fetch = require('node-fetch').default;
const { finished } = require('stream/promises');
const { DIRECTORIES, UNSAFE_EXTENSIONS } = require('./constants');
const VALID_CATEGORIES = ["bgm", "ambient"];
const VALID_CATEGORIES = ["bgm", "ambient", "blip"];
/**
* Sanitizes the input filename for theasset.