From 95e62f9d624fef7d3df19380637c80d5f2489638 Mon Sep 17 00:00:00 2001 From: Oj Date: Fri, 11 Mar 2022 14:18:25 +0000 Subject: [PATCH] [Splash > Preload] Minor context bridge tweaks / cleanup --- src/splash/index.html | 2 +- src/splash/preload.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/splash/index.html b/src/splash/index.html index 1387e6e..893fee2 100644 --- a/src/splash/index.html +++ b/src/splash/index.html @@ -106,7 +106,7 @@ const barContainer = document.querySelector('#bar-container'); const barFill = document.querySelector('#bar-fill'); - DiscordSplash.onStateUpdate(({ status, current, total, progress, seconds }) => { + Splash.onState(({ status, current, total, progress, seconds }) => { let statusText = status.replaceAll('-', ' '); let showProgress = false; diff --git a/src/splash/preload.js b/src/splash/preload.js index b66416b..7795232 100644 --- a/src/splash/preload.js +++ b/src/splash/preload.js @@ -1,6 +1,6 @@ const { contextBridge, ipcRenderer } = require('electron'); -contextBridge.exposeInMainWorld('DiscordSplash', { - onStateUpdate: callback => ipcRenderer.on('SPLASH_STATE', (_, state) => callback(state)) +contextBridge.exposeInMainWorld('Splash', { + onState: callback => ipcRenderer.on('SPLASH_STATE', (_, state) => callback(state)) }); \ No newline at end of file