mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-01 18:30:16 +01:00
This commit is contained in:
parent
2c608bf593
commit
f40a8733cc
3 changed files with 85 additions and 26 deletions
|
|
@ -87,9 +87,9 @@ export const loadAssets = (data: IAppearance) => {
|
|||
};
|
||||
|
||||
export const renderSnippet = () => {
|
||||
fetchPost("/api/snippet/getSnippet", {type: "all"}, (response) => {
|
||||
fetchPost("/api/snippet/getSnippet", {type: "all", enabled: 2}, (response) => {
|
||||
response.data.snippets.forEach((item: ISnippet) => {
|
||||
const id = `snippet${item.type === "css" ? "CSS" : "JS"}${item.name}`;
|
||||
const id = `snippet${item.type === "css" ? "CSS" : "JS"}${item.id}`;
|
||||
let exitElement = document.getElementById(id) as HTMLScriptElement;
|
||||
if (!item.enabled) {
|
||||
if (exitElement) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue