preload: Remove retry button redirection hack.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2020-12-01 17:16:32 -08:00
parent 62edfa6f8b
commit 82450a91a9
2 changed files with 0 additions and 25 deletions

View File

@@ -35,21 +35,6 @@ interface CompatElectronBridge extends ElectronBridge {
zulipWindow.electron_bridge = electron_bridge;
(async () => {
if (document.readyState === 'loading') {
await new Promise(resolve => {
document.addEventListener('DOMContentLoaded', () => {
resolve(undefined);
});
});
}
const {page_params} = zulipWindow;
if (page_params !== undefined) {
electron_bridge.send_event('zulip-loaded');
}
})();
function attributeListener<T extends EventTarget>(type: string): PropertyDescriptor {
const symbol = Symbol('on' + type);

View File

@@ -46,16 +46,6 @@ ipcRenderer.on('show-notification-settings', () => {
}, 100);
});
electron_bridge.once('zulip-loaded', () => {
// Redirect users to network troubleshooting page
const getRestartButton = document.querySelector('.restart_get_events_button');
if (getRestartButton) {
getRestartButton.addEventListener('click', () => {
ipcRenderer.send('forward-message', 'reload-viewer');
});
}
});
window.addEventListener('load', (event: any): void => {
if (!event.target.URL.includes('app/renderer/network.html')) {
return;