Removed unused preload channels
This commit is contained in:
parent
475ccfc850
commit
f279ed43b5
@ -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));
|
||||||
|
Loading…
Reference in New Issue
Block a user