Brought up to date with the private repository (6630f7f)

This commit is contained in:
S committed 2026-10-14 19:03:16 +03:00
commit c8178dce98
26 files changed
+6314

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
"use strict";
const { ipcRenderer, contextBridge } = require("electron");
const sendWhitelist = new Set()
.add("initialized")
.add("fps")
.add("printImage")
.add("reloadGame")
.add("reportError")
.add("signupCompleted");
const receiveWhitelist = new Set()
.add("flashVarsReady")
.add("hud")
.add("removed");
contextBridge.exposeInMainWorld(
"ipc", {
sendToHost: (channel, ...args) => {
if (sendWhitelist.has(channel)) {
ipcRenderer.sendToHost(channel, ...args);
}
},
on: (channel, listener) => {
if (receiveWhitelist.has(channel)) {
ipcRenderer.on(channel, listener);
}
}
}
);
ipcRenderer.on("redirect-url", (event, url) => {
console.log("REDIRECT");
});