diff --git a/src/lib/idle.js b/src/api/idle.js similarity index 97% rename from src/lib/idle.js rename to src/api/idle.js index 16c2401..cda2207 100644 --- a/src/lib/idle.js +++ b/src/api/idle.js @@ -143,6 +143,9 @@ export default async (CDP, { browserType }) => { log(`idle API active (window id: ${windowId})`); if (autoEnabled) startAuto(); + const setWindowState = async state => await CDP.send('Browser.setWindowBounds', { windowId, bounds: { windowState: state }}); + + return { hibernate, sleep, diff --git a/src/index.js b/src/index.js index 0f913ec..4a03322 100644 --- a/src/index.js +++ b/src/index.js @@ -10,7 +10,7 @@ import { fileURLToPath } from 'url'; import Chromium from './browser/chromium.js'; import Firefox from './browser/firefox.js'; -import IdleAPI from './lib/idle.js'; +import IdleAPI from './api/idle.js'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename);