Files
browser-chromium/JS/display.js
T
2024-11-01 20:55:18 -04:00

12 lines
297 B
JavaScript

/**
* @param { @param {Electron.BrowserWindow} window} window
*/
export async function changeZoom(window, zoomIn = true, reset = false) {
let zl = window.webContents.getZoomLevel();
if (reset) zl = 0
else if (zoomIn) zl++;
else zl--;
window.webContents.setZoomLevel(zl);
}