From ba56391f9734286dc5bd2ee58311087053442ce3 Mon Sep 17 00:00:00 2001 From: CanadaHonk Date: Sat, 10 Dec 2022 01:29:00 +0000 Subject: [PATCH] gluon: move onLoad into options --- gluon/index.js | 4 ++-- gluworld/index.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gluon/index.js b/gluon/index.js index 3b08178..a0bf8bc 100644 --- a/gluon/index.js +++ b/gluon/index.js @@ -1,7 +1,7 @@ const rgb = (r, g, b, msg) => `\x1b[38;2;${r};${g};${b}m${msg}\x1b[0m`; const log = (...args) => console.log(`[${rgb(88, 101, 242, 'Gluon')}]`, ...args); -process.versions.gluon = '3.1'; +process.versions.gluon = '3.2'; const presets = { // Presets from OpenAsar 'base': '--autoplay-policy=no-user-gesture-required --disable-features=WinRetrieveSuggestionsOnlyOnDemand,HardwareMediaKeyHandling,MediaSessionService', // Base Discord @@ -261,7 +261,7 @@ delete window._gluonSend; }; }; -export const open = async (url, onLoad = undefined, { windowSize } = {}) => { +export const open = async (url, { windowSize, onLoad } = {}) => { log('starting chromium...'); const Chromium = await startChromium(url, { windowSize }); diff --git a/gluworld/index.js b/gluworld/index.js index 983539a..7752dba 100644 --- a/gluworld/index.js +++ b/gluworld/index.js @@ -6,6 +6,6 @@ import { join, dirname } from 'path'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); -const Chromium = await Gluon.open(pathToFileURL(join(__dirname, 'index.html')).href, undefined, { +const Chromium = await Gluon.open(pathToFileURL(join(__dirname, 'index.html')).href, { windowSize: [ 800, 450 ] }); \ No newline at end of file