[Splash > Preload] Minor context bridge tweaks / cleanup

This commit is contained in:
Ducko 2022-03-11 14:18:25 +00:00
parent 352028a4b2
commit 95e62f9d62
2 changed files with 3 additions and 3 deletions

View file

@ -106,7 +106,7 @@
const barContainer = document.querySelector('#bar-container'); const barContainer = document.querySelector('#bar-container');
const barFill = document.querySelector('#bar-fill'); 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 statusText = status.replaceAll('-', ' ');
let showProgress = false; let showProgress = false;

View file

@ -1,6 +1,6 @@
const { contextBridge, ipcRenderer } = require('electron'); const { contextBridge, ipcRenderer } = require('electron');
contextBridge.exposeInMainWorld('DiscordSplash', { contextBridge.exposeInMainWorld('Splash', {
onStateUpdate: callback => ipcRenderer.on('SPLASH_STATE', (_, state) => callback(state)) onState: callback => ipcRenderer.on('SPLASH_STATE', (_, state) => callback(state))
}); });