fix: saving ics files

solves https://github.com/ArmCord/ArmCord/issues/613
This commit is contained in:
smartfrigde 2024-06-16 14:02:48 +02:00
parent d53addccf5
commit 31cef3a093

View file

@ -97,6 +97,10 @@ function doAfterDefiningTheWindow(passedWindow: BrowserWindow): void {
passedWindow.webContents.setWindowOpenHandler(({url}) => { passedWindow.webContents.setWindowOpenHandler(({url}) => {
// Allow about:blank (used by Vencord QuickCss popup) // Allow about:blank (used by Vencord QuickCss popup)
if (url === "about:blank") return {action: "allow"}; if (url === "about:blank") return {action: "allow"};
// Saving ics files on future events
if (url.startsWith("blob:https://discord.com/")) {
return {action: "allow", overrideBrowserWindowOptions: {show: false}};
}
// Allow Discord stream popout // Allow Discord stream popout
if ( if (
url === "https://discord.com/popout" || url === "https://discord.com/popout" ||
@ -139,6 +143,7 @@ function doAfterDefiningTheWindow(passedWindow: BrowserWindow): void {
} }
}); });
} }
return {action: "deny"}; return {action: "deny"};
}); });
if (getConfig("useLegacyCapturer") == false) { if (getConfig("useLegacyCapturer") == false) {