diff --git a/app/electron/main.js b/app/electron/main.js index bcd156684..acc66a135 100644 --- a/app/electron/main.js +++ b/app/electron/main.js @@ -1041,7 +1041,7 @@ app.whenReady().then(() => { return; } if (globalShortcut.isRegistered(shortcut)) { - globalShortcut.unregister(shortcut) + globalShortcut.unregister(shortcut); } if (index === 0) { globalShortcut.register(shortcut, () => { diff --git a/app/src/config/keymap.ts b/app/src/config/keymap.ts index 78ab596d0..51ca3d15e 100644 --- a/app/src/config/keymap.ts +++ b/app/src/config/keymap.ts @@ -186,7 +186,7 @@ export const keymap = { }, _setkeymap(app: App) { const data: Config.IKeymap = JSON.parse(JSON.stringify(Constants.SIYUAN_KEYMAP)); - const oldToggleWin = window.siyuan.config.keymap.general.toggleWin.custom + const oldToggleWin = window.siyuan.config.keymap.general.toggleWin.custom; keymap.element.querySelectorAll("label.b3-list-item input").forEach((item) => { const keys = item.getAttribute("data-key").split(Constants.ZWSP); const newHotkey = item.getAttribute("data-value"); diff --git a/app/src/config/util/snippets.ts b/app/src/config/util/snippets.ts index 403e3a888..e365eea62 100644 --- a/app/src/config/util/snippets.ts +++ b/app/src/config/util/snippets.ts @@ -171,7 +171,7 @@ export const openSnippets = () => { }, (searchResponse) => { dialog.element.querySelectorAll(`.fn__flex-1 > div > [data-type="${inputItem.dataset.type}"]`).forEach((snipeetPanel: Element) => { snipeetPanel.classList.add("fn__none"); - }) + }); searchResponse.data.snippets.forEach((snippetItem: ISnippet) => { if (snippetItem.type === inputItem.dataset.type) { dialog.element.querySelector(`[data-id="${snippetItem.id}"]`).classList.remove("fn__none"); @@ -180,7 +180,7 @@ export const openSnippets = () => { }); } }); - }) + }); }); }; diff --git a/app/src/menus/workspace.ts b/app/src/menus/workspace.ts index d136688ab..9679ed394 100644 --- a/app/src/menus/workspace.ts +++ b/app/src/menus/workspace.ts @@ -98,7 +98,7 @@ const editLayout = (layoutName?: string) => { }); dialog.destroy(); }); -} +}; const togglePinDock = (dock: Dock, icon: string) => { return { diff --git a/app/src/protyle/render/av/action.ts b/app/src/protyle/render/av/action.ts index 3d962c31b..10d36a719 100644 --- a/app/src/protyle/render/av/action.ts +++ b/app/src/protyle/render/av/action.ts @@ -331,7 +331,7 @@ ${window.siyuan.languages.insertRowBefore.replace("${x}", ' { if (!event.isComposing && event.key === "Enter") { insertRows(blockElement, protyle, parseInt(inputElement.value), rowElements[0].previousElementSibling.getAttribute("data-id")); diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.ts index 36375fb83..c444bc389 100644 --- a/app/src/protyle/render/av/cell.ts +++ b/app/src/protyle/render/av/cell.ts @@ -15,11 +15,11 @@ import {hintRef} from "../../hint/extend"; const renderCellURL = (urlContent: string) => { let host = urlContent; - let suffix = "" + let suffix = ""; try { const urlObj = new URL(urlContent); host = urlObj.host; - suffix = urlObj.href.replace(urlObj.origin, "") + suffix = urlObj.href.replace(urlObj.origin, ""); if (suffix.length > 12) { suffix = suffix.substring(0, 4) + "..." + suffix.substring(suffix.length - 6); } @@ -404,9 +404,9 @@ export const popTextCell = (protyle: IProtyle, cellElements: HTMLElement[], type addDragFill(cellElements[0]); let textPlain = inputElement.value; if (isDynamicRef(textPlain)) { - textPlain = textPlain.substring(2, 22 + 2) + textPlain = textPlain.substring(2, 22 + 2); } else { - textPlain = textPlain.substring(2) + textPlain = textPlain.substring(2); } hintRef(textPlain, protyle, "av"); avMaskElement?.remove(); @@ -630,7 +630,7 @@ export const renderCell = (cellValue: IAVCellValue) => { } else if (["email", "phone"].includes(cellValue.type)) { text = `${cellValue ? cellValue[cellValue.type as "email"].content : ""}`; } else if ("url" === cellValue.type) { - text = renderCellURL(cellValue?.url?.content || "") + text = renderCellURL(cellValue?.url?.content || ""); } else if (cellValue.type === "block") { if (cellValue?.isDetached) { text = `${cellValue.block.content || ""} @@ -709,7 +709,7 @@ const renderRollup = (cellValue: IAVCellValue) => { text = `${emailContent}`; } } else if ("url" === cellValue.type) { - const urlContent = cellValue?.url?.content || "" + const urlContent = cellValue?.url?.content || ""; if (urlContent) { text = renderCellURL(urlContent); } diff --git a/app/src/protyle/util/insertHTML.ts b/app/src/protyle/util/insertHTML.ts index 6d1630336..8fb342f47 100644 --- a/app/src/protyle/util/insertHTML.ts +++ b/app/src/protyle/util/insertHTML.ts @@ -137,7 +137,7 @@ const processAV = (range: Range, html: string, protyle: IProtyle, blockElement: } const contenteditableElement = getContenteditableElement(tempElement.content.firstElementChild); if (contenteditableElement && contenteditableElement.childNodes.length === 1 && contenteditableElement.firstElementChild?.getAttribute("data-type") === "block-ref") { - const selectCellElement = blockElement.querySelector(".av__cell--select") as HTMLElement + const selectCellElement = blockElement.querySelector(".av__cell--select") as HTMLElement; if (selectCellElement) { const avID = blockElement.dataset.avId; const sourceId = contenteditableElement.firstElementChild.getAttribute("data-id");