diff --git a/app/src/block/Panel.ts b/app/src/block/Panel.ts index 9090e4672..6ce2c81af 100644 --- a/app/src/block/Panel.ts +++ b/app/src/block/Panel.ts @@ -216,7 +216,7 @@ export class BlockPanel { this.element = undefined; this.targetElement = undefined; // 移除弹出上使用右键菜单 - const menuLevel = parseInt(window.siyuan.menus.menu.element.dataset.from) + const menuLevel = parseInt(window.siyuan.menus.menu.element.dataset.from); if (window.siyuan.menus.menu.element.dataset.from !== "app" && menuLevel && menuLevel >= level) { // https://github.com/siyuan-note/siyuan/issues/9854 右键菜单不是从浮窗中弹出的则不进行移除 window.siyuan.menus.menu.remove(); diff --git a/app/src/block/popover.ts b/app/src/block/popover.ts index 310c04d51..6464983e4 100644 --- a/app/src/block/popover.ts +++ b/app/src/block/popover.ts @@ -182,7 +182,7 @@ const hidePopover = (event: MouseEvent & { path: HTMLElement[] }) => { if (blockElement) { for (let i = window.siyuan.blockPanels.length - 1; i >= 0; i--) { const item = window.siyuan.blockPanels[i]; - const itemLevel = parseInt(item.element.getAttribute("data-level")) + const itemLevel = parseInt(item.element.getAttribute("data-level")); if ((item.targetElement || typeof item.x === "number") && itemLevel > (maxEditLevels[item.element.getAttribute("data-oid")] || 0) && item.element.getAttribute("data-pin") === "false" && diff --git a/app/src/constants.ts b/app/src/constants.ts index 06e319ccb..76dbd7021 100644 --- a/app/src/constants.ts +++ b/app/src/constants.ts @@ -9,12 +9,12 @@ const _NODE_ENV = NODE_ENV; const altNumber = navigator.platform.toUpperCase().indexOf("MAC") > -1 ? "⌃" : "⌥"; const getFunctionKey = () => { - const fData: { [key: number]: string } = {} + const fData: { [key: number]: string } = {}; for (let i = 1; i <= 32; i++) { fData[i + 111] = "F" + i; } return fData; -} +}; export abstract class Constants { public static readonly SIYUAN_VERSION: string = _SIYUAN_VERSION; diff --git a/app/src/protyle/render/abcRender.ts b/app/src/protyle/render/abcRender.ts index b8abbe46a..c7ab4ff91 100644 --- a/app/src/protyle/render/abcRender.ts +++ b/app/src/protyle/render/abcRender.ts @@ -16,7 +16,7 @@ export const abcRender = (element: Element, cdn = Constants.PROTYLE_CDN) => { } if (abcElements.length > 0) { addScript(`${cdn}/js/abcjs/abcjs-basic-min.js?v=6.2.2`, "protyleAbcjsScript").then(() => { - const wysiswgElement = hasClosestByClassName(element, "protyle-wysiwyg", true) + const wysiswgElement = hasClosestByClassName(element, "protyle-wysiwyg", true); abcElements.forEach((e: HTMLDivElement) => { if (e.getAttribute("data-render") === "true") { return; diff --git a/app/src/protyle/render/av/rollup.ts b/app/src/protyle/render/av/rollup.ts index 61fbb62c6..554310307 100644 --- a/app/src/protyle/render/av/rollup.ts +++ b/app/src/protyle/render/av/rollup.ts @@ -4,7 +4,6 @@ import {upDownHint} from "../../../util/upDownHint"; import {fetchPost} from "../../../util/fetch"; import {escapeHtml} from "../../../util/escape"; import {transaction} from "../../wysiwyg/transaction"; -import {genIconHTML} from "../util"; import {unicode2Emoji} from "../../../emoji"; import {getColIconByType} from "./col"; import {showMessage} from "../../../dialog/message"; diff --git a/app/src/protyle/render/chartRender.ts b/app/src/protyle/render/chartRender.ts index 413e62cb1..1243d205a 100644 --- a/app/src/protyle/render/chartRender.ts +++ b/app/src/protyle/render/chartRender.ts @@ -30,7 +30,7 @@ export const chartRender = (element: Element, cdn = Constants.PROTYLE_CDN) => { }); } } - const wysiswgElement = hasClosestByClassName(element, "protyle-wysiwyg", true) + const wysiswgElement = hasClosestByClassName(element, "protyle-wysiwyg", true); echartsElements.forEach(async (e: HTMLDivElement) => { if (e.getAttribute("data-render") === "true") { return; diff --git a/app/src/protyle/render/flowchartRender.ts b/app/src/protyle/render/flowchartRender.ts index cd4060d5d..7415723c4 100644 --- a/app/src/protyle/render/flowchartRender.ts +++ b/app/src/protyle/render/flowchartRender.ts @@ -36,7 +36,7 @@ export const flowchartRender = (element: Element, cdn = Constants.PROTYLE_CDN) = }; const initFlowchart = (flowchartElements: Element[]) => { - const wysiswgElement = hasClosestByClassName(flowchartElements[0], "protyle-wysiwyg", true) + const wysiswgElement = hasClosestByClassName(flowchartElements[0], "protyle-wysiwyg", true); flowchartElements.forEach((item: HTMLElement) => { if (item.getAttribute("data-render") === "true") { return; diff --git a/app/src/protyle/render/graphvizRender.ts b/app/src/protyle/render/graphvizRender.ts index eaf3cb72e..412cd26cf 100644 --- a/app/src/protyle/render/graphvizRender.ts +++ b/app/src/protyle/render/graphvizRender.ts @@ -15,7 +15,7 @@ export const graphvizRender = (element: Element, cdn = Constants.PROTYLE_CDN) => return; } addScript(`${cdn}/js/graphviz/viz.js?v=0.0.0`, "protyleGraphVizScript").then(() => { - const wysiswgElement = hasClosestByClassName(element, "protyle-wysiwyg", true) + const wysiswgElement = hasClosestByClassName(element, "protyle-wysiwyg", true); graphvizElements.forEach((e: HTMLDivElement) => { if (e.getAttribute("data-render") === "true") { return; diff --git a/app/src/protyle/render/mermaidRender.ts b/app/src/protyle/render/mermaidRender.ts index 625952232..806bcc00c 100644 --- a/app/src/protyle/render/mermaidRender.ts +++ b/app/src/protyle/render/mermaidRender.ts @@ -57,7 +57,7 @@ export const mermaidRender = (element: Element, cdn = Constants.PROTYLE_CDN) => }; const initMermaid = (mermaidElements: Element[]) => { - const wysiswgElement = hasClosestByClassName(mermaidElements[0], "protyle-wysiwyg", true) + const wysiswgElement = hasClosestByClassName(mermaidElements[0], "protyle-wysiwyg", true); mermaidElements.forEach(async (item: HTMLElement) => { if (item.getAttribute("data-render") === "true") { return; diff --git a/app/src/protyle/render/mindmapRender.ts b/app/src/protyle/render/mindmapRender.ts index 2acb3348c..f640f3a5b 100644 --- a/app/src/protyle/render/mindmapRender.ts +++ b/app/src/protyle/render/mindmapRender.ts @@ -27,7 +27,7 @@ export const mindmapRender = (element: Element, cdn = Constants.PROTYLE_CDN) => }); } } - const wysiswgElement = hasClosestByClassName(element, "protyle-wysiwyg", true) + const wysiswgElement = hasClosestByClassName(element, "protyle-wysiwyg", true); mindmapElements.forEach((e: HTMLDivElement) => { if (e.getAttribute("data-render") === "true") { return; diff --git a/app/src/protyle/render/plantumlRender.ts b/app/src/protyle/render/plantumlRender.ts index 1d3a5cf67..17b2a7b2b 100644 --- a/app/src/protyle/render/plantumlRender.ts +++ b/app/src/protyle/render/plantumlRender.ts @@ -15,7 +15,7 @@ export const plantumlRender = (element: Element, cdn = Constants.PROTYLE_CDN) => return; } addScript(`${cdn}/js/plantuml/plantuml-encoder.min.js?v=0.0.0`, "protylePlantumlScript").then(() => { - const wysiswgElement = hasClosestByClassName(element, "protyle-wysiwyg", true) + const wysiswgElement = hasClosestByClassName(element, "protyle-wysiwyg", true); plantumlElements.forEach((e: HTMLDivElement) => { if (e.getAttribute("data-render") === "true") { return; diff --git a/app/src/protyle/util/onGet.ts b/app/src/protyle/util/onGet.ts index 45c96adb5..d06015b77 100644 --- a/app/src/protyle/util/onGet.ts +++ b/app/src/protyle/util/onGet.ts @@ -299,7 +299,7 @@ export const disabledProtyle = (protyle: IProtyle) => { protyle.wysiwyg.element.querySelectorAll(".render-node .protyle-action__edit").forEach(item => { item.classList.add("fn__none"); if (item.classList.contains("protyle-icon--first")) { - item.nextElementSibling?.classList.add("protyle-icon--first") + item.nextElementSibling?.classList.add("protyle-icon--first"); } }); protyle.wysiwyg.element.style.userSelect = "text"; @@ -357,7 +357,7 @@ export const enableProtyle = (protyle: IProtyle) => { protyle.wysiwyg.element.querySelectorAll(".render-node .protyle-action__edit").forEach(item => { item.classList.remove("fn__none"); if (item.classList.contains("protyle-icon--first")) { - item.nextElementSibling?.classList.remove("protyle-icon--first") + item.nextElementSibling?.classList.remove("protyle-icon--first"); } }); protyle.wysiwyg.element.querySelectorAll('[contenteditable="false"][spellcheck]').forEach(item => {