Vanessa 2025-03-27 20:31:45 +08:00
parent 7587b91a5c
commit 8c0e9369f3
2 changed files with 8 additions and 1 deletions

View file

@ -232,7 +232,7 @@ export abstract class Constants {
public static readonly TIMEOUT_COUNT = 1000; public static readonly TIMEOUT_COUNT = 1000;
// id // id
public static readonly HELP_PATH = { public static readonly HELP_PATH: { [key: string]: string } = {
zh_CN: "20210808180117-czj9bvb", zh_CN: "20210808180117-czj9bvb",
zh_CHT: "20211226090932-5lcq56f", zh_CHT: "20211226090932-5lcq56f",
ja_JP: "20240530133126-axarxgx", ja_JP: "20240530133126-axarxgx",

View file

@ -61,7 +61,14 @@ export const setLocalShorthandCount = () => {
} }
fileElement = (dockFile.data.file as Files).element; fileElement = (dockFile.data.file as Files).element;
/// #endif /// #endif
const helpIDs: string[] = [];
Object.keys(Constants.HELP_PATH).forEach((key) => {
helpIDs.push(Constants.HELP_PATH[key]);
});
fileElement.childNodes.forEach((item: Element) => { fileElement.childNodes.forEach((item: Element) => {
if (item.querySelector('[data-type="addLocal"]') || helpIDs.includes(item.getAttribute("data-url"))) {
return;
}
item.querySelector('[data-type="more-root"]').insertAdjacentHTML("beforebegin", `<span data-type="addLocal" class="b3-list-item__action"> item.querySelector('[data-type="more-root"]').insertAdjacentHTML("beforebegin", `<span data-type="addLocal" class="b3-list-item__action">
<svg><use xlink:href="#iconRiffCard"></use></svg> <svg><use xlink:href="#iconRiffCard"></use></svg>
</span>`); </span>`);