rename ipc event
This commit is contained in:
parent
5381340074
commit
df6b85cc7a
3 changed files with 3 additions and 3 deletions
|
@ -135,7 +135,7 @@ handle(IpcEvents.CLIPBOARD_COPY_IMAGE, async (_, buf: ArrayBuffer, src: string)
|
|||
});
|
||||
});
|
||||
|
||||
handle(IpcEvents.FOUROHFOUR_PAGE_HANDLER, _ => {
|
||||
handle(IpcEvents.PAGE_NOT_FOUND_HANDLER, _ => {
|
||||
loadUrl(undefined);
|
||||
console.warn("caught incomplete uri scheme. dumping to main app");
|
||||
});
|
||||
|
|
|
@ -25,7 +25,7 @@ style.id = "vcd-css-core";
|
|||
style.textContent = readFileSync(rendererCss, "utf-8");
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
if (document.title === "Page Not Found | Discord") ipcRenderer.invoke(IpcEvents.FOUROHFOUR_PAGE_HANDLER);
|
||||
if (document.title === "Page Not Found | Discord") ipcRenderer.invoke(IpcEvents.PAGE_NOT_FOUND_HANDLER);
|
||||
});
|
||||
|
||||
if (document.readyState === "complete") {
|
||||
|
|
|
@ -52,5 +52,5 @@ export const enum IpcEvents {
|
|||
|
||||
CLIPBOARD_COPY_IMAGE = "VCD_CLIPBOARD_COPY_IMAGE",
|
||||
|
||||
FOUROHFOUR_PAGE_HANDLER = "VCD_404_PAGE_HANDLER"
|
||||
PAGE_NOT_FOUND_HANDLER = "VCD_PAGE_NOT_FOUND_HANDLER"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue