diff --git a/app/src/boot/globalEvent/event.ts b/app/src/boot/globalEvent/event.ts index 6b228ea46..b35f90dda 100644 --- a/app/src/boot/globalEvent/event.ts +++ b/app/src/boot/globalEvent/event.ts @@ -138,7 +138,7 @@ export const initWindowEvent = (app: App) => { zoomIn, }); window.siyuan.menus.menu.remove(); - }) + }); } event.stopImmediatePropagation(); event.preventDefault(); diff --git a/app/src/boot/globalEvent/searchKeydown.ts b/app/src/boot/globalEvent/searchKeydown.ts index 072e36223..b473324b8 100644 --- a/app/src/boot/globalEvent/searchKeydown.ts +++ b/app/src/boot/globalEvent/searchKeydown.ts @@ -101,7 +101,7 @@ export const searchKeydown = (app: App, event: KeyboardEvent) => { if (dialog) { dialog.destroy({focus: "false"}); } - }) + }); return true; } const id = currentList.getAttribute("data-node-id"); @@ -206,7 +206,7 @@ export const searchKeydown = (app: App, event: KeyboardEvent) => { if (dialog) { dialog.destroy({focus: "false"}); } - }) + }); } } else { /// #if !BROWSER diff --git a/app/src/editor/util.ts b/app/src/editor/util.ts index c5f8bc3a6..de1898220 100644 --- a/app/src/editor/util.ts +++ b/app/src/editor/util.ts @@ -33,9 +33,9 @@ export const checkFold = (id: string, cb: (zoomIn: boolean, action: string[]) => return; } fetchPost("/api/block/checkBlockFold", {id}, (foldResponse) => { - cb(foldResponse.data, foldResponse.data ? [Constants.CB_GET_FOCUS, Constants.CB_GET_ALL] : [Constants.CB_GET_FOCUS, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]) + cb(foldResponse.data, foldResponse.data ? [Constants.CB_GET_FOCUS, Constants.CB_GET_ALL] : [Constants.CB_GET_FOCUS, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]); }); -} +}; export const openFileById = async (options: { app: App, diff --git a/app/src/layout/dock/Bookmark.ts b/app/src/layout/dock/Bookmark.ts index 5a03cd99d..1914f7efe 100644 --- a/app/src/layout/dock/Bookmark.ts +++ b/app/src/layout/dock/Bookmark.ts @@ -84,7 +84,7 @@ export class Bookmark extends Model { return; } } - const id = element.getAttribute("data-node-id") + const id = element.getAttribute("data-node-id"); checkFold(id, (zoomIn, action: string[]) => { openFileById({ app, @@ -98,7 +98,7 @@ export class Bookmark extends Model { openBookmarkMenu(element, event, this); }, ctrlClick: (element: HTMLElement) => { - const id = element.getAttribute("data-node-id") + const id = element.getAttribute("data-node-id"); checkFold(id, (zoomIn) => { openFileById({ app, @@ -107,10 +107,10 @@ export class Bookmark extends Model { action: zoomIn ? [Constants.CB_GET_HL, Constants.CB_GET_ALL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL], zoomIn }); - }) + }); }, altClick: (element: HTMLElement,) => { - const id = element.getAttribute("data-node-id") + const id = element.getAttribute("data-node-id"); checkFold(id, (zoomIn, action: string[]) => { openFileById({ app, @@ -119,10 +119,10 @@ export class Bookmark extends Model { action, zoomIn }); - }) + }); }, shiftClick: (element: HTMLElement) => { - const id = element.getAttribute("data-node-id") + const id = element.getAttribute("data-node-id"); checkFold(id, (zoomIn, action: string[]) => { openFileById({ app, @@ -131,7 +131,7 @@ export class Bookmark extends Model { action, zoomIn }); - }) + }); }, blockExtHTML: '', topExtHTML: '', diff --git a/app/src/layout/dock/Graph.ts b/app/src/layout/dock/Graph.ts index 3342a9bf0..8a86ded89 100644 --- a/app/src/layout/dock/Graph.ts +++ b/app/src/layout/dock/Graph.ts @@ -660,7 +660,7 @@ export class Graph extends Model { action, zoomIn }); - }) + }); } else if (window.siyuan.altIsPressed) { checkFold(node.id, (zoomIn, action: string[]) => { openFileById({ @@ -670,7 +670,7 @@ export class Graph extends Model { action, zoomIn }); - }) + }); } else if (window.siyuan.ctrlIsPressed) { window.siyuan.blockPanels.push(new BlockPanel({ app: this.app, @@ -687,7 +687,7 @@ export class Graph extends Model { action, zoomIn }); - }) + }); } }); }, 1000); diff --git a/app/src/layout/dock/Outline.ts b/app/src/layout/dock/Outline.ts index 07dcf7db6..bf377d43e 100644 --- a/app/src/layout/dock/Outline.ts +++ b/app/src/layout/dock/Outline.ts @@ -129,7 +129,7 @@ export class Outline extends Model { id, action: zoomIn ? [Constants.CB_GET_FOCUS, Constants.CB_GET_ALL, Constants.CB_GET_HTML] : [Constants.CB_GET_FOCUS, Constants.CB_GET_SETID, Constants.CB_GET_CONTEXT, Constants.CB_GET_HTML], }); - }) + }); } }, ctrlClick(element: HTMLElement) { diff --git a/app/src/menus/util.ts b/app/src/menus/util.ts index 176372c51..e3f036c5c 100644 --- a/app/src/menus/util.ts +++ b/app/src/menus/util.ts @@ -49,7 +49,7 @@ export const openEditorTab = (app: App, id: string, notebookId?: string, pathStr action, zoomIn }); - }) + }); } } }, { @@ -68,7 +68,7 @@ export const openEditorTab = (app: App, id: string, notebookId?: string, pathStr action, zoomIn }); - }) + }); } } }]; @@ -93,7 +93,7 @@ export const openEditorTab = (app: App, id: string, notebookId?: string, pathStr zoomIn, removeCurrentTab: false }); - }) + }); } } }); diff --git a/app/src/mobile/dock/MobileBookmarks.ts b/app/src/mobile/dock/MobileBookmarks.ts index a92a5203b..5806da57f 100644 --- a/app/src/mobile/dock/MobileBookmarks.ts +++ b/app/src/mobile/dock/MobileBookmarks.ts @@ -5,7 +5,7 @@ import {hasClosestByClassName} from "../../protyle/util/hasClosest"; import {openMobileFileById} from "../editor"; import {openBookmarkMenu} from "../../menus/bookmark"; import {App} from "../../index"; -import {checkFold, openFileById} from "../../editor/util"; +import {checkFold} from "../../editor/util"; export class MobileBookmarks { public element: HTMLElement; @@ -39,7 +39,7 @@ export class MobileBookmarks { return; } } - checkFold(id, (zoomIn, action) => { + checkFold(id, (zoomIn) => { openMobileFileById(app, id, zoomIn ? [Constants.CB_GET_HL, Constants.CB_GET_ALL] : [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT, Constants.CB_GET_ROOTSCROLL]); }); }, diff --git a/app/src/protyle/wysiwyg/index.ts b/app/src/protyle/wysiwyg/index.ts index 97a2efcd6..2b3ab1b00 100644 --- a/app/src/protyle/wysiwyg/index.ts +++ b/app/src/protyle/wysiwyg/index.ts @@ -1793,7 +1793,7 @@ export class WYSIWYG { }); } /// #endif - }) + }); /// #if !MOBILE if (protyle.model) { // 打开双链需记录到后退中 https://github.com/siyuan-note/insider/issues/801 @@ -1941,7 +1941,7 @@ export class WYSIWYG { })); } /// #endif - }) + }); event.stopPropagation(); return; } diff --git a/app/src/protyle/wysiwyg/keydown.ts b/app/src/protyle/wysiwyg/keydown.ts index e887193c3..f2e41df44 100644 --- a/app/src/protyle/wysiwyg/keydown.ts +++ b/app/src/protyle/wysiwyg/keydown.ts @@ -1532,7 +1532,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => { action, zoomIn }); - }) + }); event.preventDefault(); event.stopPropagation(); return true; diff --git a/app/src/search/util.ts b/app/src/search/util.ts index 5ca1a5a23..7531d4041 100644 --- a/app/src/search/util.ts +++ b/app/src/search/util.ts @@ -876,7 +876,7 @@ export const genSearch = (app: App, config: ISearchOption, element: Element, clo if (closeCB) { closeCB(); } - }) + }); } else if (!target.classList.contains("b3-list-item--focus")) { searchPanelElement.querySelector(".b3-list-item--focus").classList.remove("b3-list-item--focus"); target.classList.add("b3-list-item--focus"); @@ -915,7 +915,7 @@ export const genSearch = (app: App, config: ISearchOption, element: Element, clo if (closeCB) { closeCB(); } - }) + }); } } window.siyuan.menus.menu.remove();