refactor: remove unused chat.google.com

This commit is contained in:
林一二 2021-08-07 10:41:08 +08:00
parent 1d3d998e3a
commit f0810fc85f

View file

@ -153,12 +153,6 @@ export default function setupViewEventHandlers(
if (workspaceObject === undefined) {
return;
}
// fix "Google Chat isn't supported on your current browser"
// https://github.com/atomery/webcatalog/issues/820
if (typeof url === 'string' && url.includes('error/browser-not-supported') && url.startsWith('https://chat.google.com')) {
const reference = new URL(url).searchParams.get('ref') ?? '';
void view.webContents.loadURL(`https://chat.google.com${reference}`);
}
if (workspaceObject.active) {
await windowService.sendToAllWindows(WindowChannel.updateCanGoBack, view.webContents.canGoBack());
await windowService.sendToAllWindows(WindowChannel.updateCanGoForward, view.webContents.canGoForward());