mirror of
https://github.com/ION606/browser-chromium.git
synced 2026-05-14 22:26:56 +00:00
initial commit/backup
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
/**
|
||||
* @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);
|
||||
}
|
||||
Reference in New Issue
Block a user