diff --git a/src-tauri/src/pake.js b/src-tauri/src/pake.js index 6216658..95978aa 100644 --- a/src-tauri/src/pake.js +++ b/src-tauri/src/pake.js @@ -1,3 +1,5 @@ +// @ts-check + /** * @typedef {string} KeyboardKey `event.key` 的代号, * 见 @@ -107,11 +109,11 @@ window.addEventListener('DOMContentLoaded', (_event) => { } }); - domEl.addEventListener('touchstart', (e) => { + domEl.addEventListener('touchstart', () => { window.ipc.postMessage('drag_window'); }); - domEl.addEventListener('dblclick', (e) => { + domEl.addEventListener('dblclick', () => { window.ipc.postMessage('fullscreen'); }); @@ -144,6 +146,9 @@ function setDefaultZoom() { } } +/** + * @param {(htmlZoom: string) => string} [zoomRule] + */ function zoomCommon(zoomRule) { const htmlZoom = window.localStorage.getItem('htmlZoom') || '100%'; const html = document.getElementsByTagName('html')[0];