Removed unused preload channels

This commit is contained in:
RemixDev 2022-05-28 15:22:40 +02:00
parent 475ccfc850
commit f279ed43b5

View File

@ -9,13 +9,13 @@ contextBridge.exposeInMainWorld(
"api", { "api", {
send: (channel, data) => { send: (channel, data) => {
// whitelist channels // whitelist channels
let validChannels = ["openDownloadsFolder", "applogin", "selectDownloadFolder"]; let validChannels = ["openDownloadsFolder", "selectDownloadFolder"];
if (validChannels.includes(channel)) { if (validChannels.includes(channel)) {
ipcRenderer.send(channel, data); ipcRenderer.send(channel, data);
} }
}, },
receive: (channel, func) => { receive: (channel, func) => {
let validChannels = ["downloadFolderSelected", "applogin_arl"]; let validChannels = ["downloadFolderSelected"];
if (validChannels.includes(channel)) { if (validChannels.includes(channel)) {
// Deliberately strip event as it includes `sender` // Deliberately strip event as it includes `sender`
ipcRenderer.on(channel, (event, ...args) => func(...args)); ipcRenderer.on(channel, (event, ...args) => func(...args));