forked from Mirrors/OpenAsar
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
469 B
13 lines
469 B
const { contextBridge, ipcRenderer } = require('electron');
|
|
|
|
const { saferShellOpenExternal } = require('../utils/securityUtils');
|
|
|
|
|
|
contextBridge.exposeInMainWorld('DiscordSplash', {
|
|
signalReady: () => ipcRenderer.send('DISCORD_SPLASH_SCREEN_READY'),
|
|
|
|
onStateUpdate: callback => ipcRenderer.on('DISCORD_SPLASH_UPDATE_STATE', (_, state) => callback(state)),
|
|
|
|
openUrl: saferShellOpenExternal,
|
|
quitDiscord: () => ipcRenderer.send('DISCORD_SPLASH_SCREEN_QUIT')
|
|
}); |