diff --git a/app/src/asset/anno.ts b/app/src/asset/anno.ts index 2f8c0fb52..e30c51f73 100644 --- a/app/src/asset/anno.ts +++ b/app/src/asset/anno.ts @@ -167,7 +167,7 @@ export const initAnno = (element: HTMLElement, pdf: any) => { item.style.backgroundColor = "transparent"; } }); - }) + }); fetchPost("/api/asset/setFileAnnotation", { path: pdf.appConfig.file.replace(location.origin, "").substr(1) + ".sya", data: JSON.stringify(config), @@ -723,7 +723,7 @@ export const hlPDFRect = (element: HTMLElement, id: string) => { item.classList.remove("pdf__rect--hl"); }, 1500); } - }) + }); }; const copyAnno = (idPath: string, fileName: string, pdf: any) => { diff --git a/app/src/boot/globalEvent/command/protyle.ts b/app/src/boot/globalEvent/command/protyle.ts index 08f1adc2b..adbdc36ee 100644 --- a/app/src/boot/globalEvent/command/protyle.ts +++ b/app/src/boot/globalEvent/command/protyle.ts @@ -20,7 +20,7 @@ export const onlyProtyleCommand = (options: { } if (options.command === "switchAdjust") { let fullWidth; - const adjustWidth = options.protyle.wysiwyg.element.getAttribute(Constants.CUSTOM_SY_FULLWIDTH) + const adjustWidth = options.protyle.wysiwyg.element.getAttribute(Constants.CUSTOM_SY_FULLWIDTH); if (!adjustWidth) { fullWidth = window.siyuan.config.editor.fullWidth ? "false" : "true"; } else { diff --git a/app/src/layout/Wnd.ts b/app/src/layout/Wnd.ts index 422aaf911..571e6cc67 100644 --- a/app/src/layout/Wnd.ts +++ b/app/src/layout/Wnd.ts @@ -229,7 +229,7 @@ export class Wnd { if (headerDragCounter === 0) { document.querySelectorAll(".layout-tab-bars--drag").forEach(item => { item.classList.remove("layout-tab-bars--drag"); - }) + }); clearTimeout(dragleaveTimeout); // 窗口拖拽到新窗口时,不 drop 无法移除 clone 的元素 dragleaveTimeout = window.setTimeout(() => { @@ -255,7 +255,7 @@ export class Wnd { }) { document.querySelectorAll(".layout-tab-bars--drag").forEach(item => { item.classList.remove("layout-tab-bars--drag"); - }) + }); headerDragCounter = 0; const it = this as HTMLElement; if (event.dataTransfer.types.includes(Constants.SIYUAN_DROP_FILE)) { diff --git a/app/src/menus/protyle.ts b/app/src/menus/protyle.ts index c18e881b0..dc0055046 100644 --- a/app/src/menus/protyle.ts +++ b/app/src/menus/protyle.ts @@ -927,8 +927,8 @@ export const zoomOut = (options: { if (options.focusId) { let focusElement = options.protyle.wysiwyg.element.querySelector(`[data-node-id="${options.focusId}"]`); if (!focusElement) { - const unfoldResponse = await fetchSyncPost("/api/block/getUnfoldedParentID", {id: options.focusId}) - options.focusId = unfoldResponse.data.parentID + const unfoldResponse = await fetchSyncPost("/api/block/getUnfoldedParentID", {id: options.focusId}); + options.focusId = unfoldResponse.data.parentID; focusElement = options.protyle.wysiwyg.element.querySelector(`[data-node-id="${unfoldResponse.data.parentID}"]`); } if (focusElement) { diff --git a/app/src/protyle/header/Title.ts b/app/src/protyle/header/Title.ts index cc1ea8b04..1b40c9b3b 100644 --- a/app/src/protyle/header/Title.ts +++ b/app/src/protyle/header/Title.ts @@ -46,13 +46,13 @@ export class Title { this.editElement.addEventListener("paste", (event: ClipboardEvent) => { event.stopPropagation(); event.preventDefault(); - const range = getSelection().getRangeAt(0) - let text = event.clipboardData.getData("text/siyuan") + const range = getSelection().getRangeAt(0); + let text = event.clipboardData.getData("text/siyuan"); range.deleteContents(); if (text) { - text = protyle.lute.BlockDOM2Content(text) + text = protyle.lute.BlockDOM2Content(text); } else { - text = event.clipboardData.getData("text/plain") + text = event.clipboardData.getData("text/plain"); } range.insertNode(document.createTextNode(replaceFileName(text))); range.collapse(false); diff --git a/app/src/protyle/render/av/openMenuPanel.ts b/app/src/protyle/render/av/openMenuPanel.ts index e0bdee444..df201a298 100644 --- a/app/src/protyle/render/av/openMenuPanel.ts +++ b/app/src/protyle/render/av/openMenuPanel.ts @@ -1291,7 +1291,7 @@ export const openMenuPanel = (options: { } else if (type === "av-view-switch") { if (!target.parentElement.classList.contains("b3-menu__item--current")) { avPanelElement.querySelector(".b3-menu__item--current")?.classList.remove("b3-menu__item--current"); - target.parentElement.classList.add("b3-menu__item--current") + target.parentElement.classList.add("b3-menu__item--current"); options.blockElement.removeAttribute("data-render"); avRender(options.blockElement, options.protyle, undefined, target.parentElement.dataset.id); } @@ -1307,7 +1307,7 @@ export const openMenuPanel = (options: { }); } else { avPanelElement.querySelector(".b3-menu__item--current")?.classList.remove("b3-menu__item--current"); - target.parentElement.classList.add("b3-menu__item--current") + target.parentElement.classList.add("b3-menu__item--current"); options.blockElement.removeAttribute("data-render"); avRender(options.blockElement, options.protyle, () => { openViewMenu({ diff --git a/app/src/protyle/render/av/render.ts b/app/src/protyle/render/av/render.ts index 73f1c7d45..cd1336c83 100644 --- a/app/src/protyle/render/av/render.ts +++ b/app/src/protyle/render/av/render.ts @@ -227,7 +227,7 @@ ${cell.color ? `color:${cell.color};` : ""}">${renderCell(cell.value, rowIndex)}
-` +`; if (renderAll) { e.firstElementChild.outerHTML = `