Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1e3f165857 |
3 changed files with 14 additions and 7 deletions
|
|
@ -27,9 +27,9 @@
|
||||||
<control>pointing</control>
|
<control>pointing</control>
|
||||||
</supports>
|
</supports>
|
||||||
<releases>
|
<releases>
|
||||||
<release date="2026-05-05" version="1.0.6">
|
<release date="2026-05-05" version="1.0.7">
|
||||||
<description>
|
<description>
|
||||||
<p>Fixed VC sounds and tightened game presence to catalog entries plus user allowlists.</p>
|
<p>Fixed a main-process bootstrap race and improved VC sounds / game presence behavior.</p>
|
||||||
</description>
|
</description>
|
||||||
</release>
|
</release>
|
||||||
<release date="2026-04-22" version="1.0.0">
|
<release date="2026-04-22" version="1.0.0">
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
"name": "sanctum",
|
"name": "sanctum",
|
||||||
"productName": "Sanctum",
|
"productName": "Sanctum",
|
||||||
"version": "1.0.6",
|
"version": "1.0.7",
|
||||||
"aviaVersion": "1.0.6",
|
"aviaVersion": "1.0.7",
|
||||||
"main": ".vite/build/main.js",
|
"main": ".vite/build/main.js",
|
||||||
"repository": "https://git.mithraic.cloud/ad3laid3/sanctum",
|
"repository": "https://git.mithraic.cloud/ad3laid3/sanctum",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
||||||
13
src/main.ts
13
src/main.ts
|
|
@ -46,8 +46,12 @@ const acquiredLock = app.requestSingleInstanceLock();
|
||||||
const loadInject = () => {
|
const loadInject = () => {
|
||||||
if (!mainWindow) return;
|
if (!mainWindow) return;
|
||||||
|
|
||||||
mainWindow.webContents.on("dom-ready", async () => {
|
const wc = mainWindow.webContents;
|
||||||
|
wc.removeAllListeners("dom-ready");
|
||||||
|
wc.once("dom-ready", async () => {
|
||||||
try {
|
try {
|
||||||
|
if (mainWindow.isDestroyed() || wc.isDestroyed()) return;
|
||||||
|
|
||||||
const builtInLocalPlugins = [
|
const builtInLocalPlugins = [
|
||||||
{
|
{
|
||||||
id: "sanctum-vcsounds",
|
id: "sanctum-vcsounds",
|
||||||
|
|
@ -58,13 +62,15 @@ const loadInject = () => {
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
await mainWindow.webContents.executeJavaScript(
|
await wc.executeJavaScript(
|
||||||
`window.__SANCTUM_BUILTIN_LOCAL_PLUGINS__ = ${JSON.stringify(
|
`window.__SANCTUM_BUILTIN_LOCAL_PLUGINS__ = ${JSON.stringify(
|
||||||
builtInLocalPlugins,
|
builtInLocalPlugins,
|
||||||
)};`,
|
)};`,
|
||||||
true,
|
true,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (mainWindow.isDestroyed() || wc.isDestroyed()) return;
|
||||||
|
|
||||||
const plugins: string[] = [
|
const plugins: string[] = [
|
||||||
"inject.js",
|
"inject.js",
|
||||||
"LocalPlugins.js",
|
"LocalPlugins.js",
|
||||||
|
|
@ -84,9 +90,10 @@ const loadInject = () => {
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const plugin of plugins) {
|
for (const plugin of plugins) {
|
||||||
|
if (mainWindow.isDestroyed() || wc.isDestroyed()) return;
|
||||||
const pluginPath: string = path.join(__dirname, plugin);
|
const pluginPath: string = path.join(__dirname, plugin);
|
||||||
const pluginCode: string = fs.readFileSync(pluginPath, "utf8");
|
const pluginCode: string = fs.readFileSync(pluginPath, "utf8");
|
||||||
await mainWindow.webContents.executeJavaScript(pluginCode, true);
|
await wc.executeJavaScript(pluginCode, true);
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
/* empty */
|
/* empty */
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue