mirror of
https://github.com/ION606/browser-chromium.git
synced 2026-05-14 22:26:56 +00:00
12 lines
297 B
JavaScript
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);
|
|
} |