diff options
author | RaindropsSys <contact@minteck.org> | 2023-04-10 13:18:12 +0200 |
---|---|---|
committer | RaindropsSys <contact@minteck.org> | 2023-04-10 13:18:12 +0200 |
commit | b923af24291bac3c6fb41cf1f0b057b691c653bb (patch) | |
tree | a67b32c23a2ad06b8abca1d880d2836e0a418503 /index.html | |
parent | d1fae42963bc184d5ff12a9b1771a68ac9699c55 (diff) | |
download | cold-haze-desktop-mane.tar.gz cold-haze-desktop-mane.tar.bz2 cold-haze-desktop-mane.zip |
Diffstat (limited to 'index.html')
-rw-r--r-- | index.html | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -114,10 +114,27 @@ <script> const { BrowserWindow, dialog, getCurrentWindow } = require('@electron/remote'); + const { ipcRenderer } = require('electron'); let loadingRemoteContent = false; let loaded = false; let currentSite = null; + window.navigateURLInterval = null; + + ipcRenderer.on('navigate', (_, data) => { + if (loaded) { + openURL(data); + } else { + clearInterval(navigateURLInterval); + window.navigateURLInterval = setInterval(() => { + if (loaded) { + clearInterval(navigateURLInterval); + openURL(data); + } + }); + } + }); + function protoURItoURL(uri) { let protocol = new URL(uri).protocol; let href = new URL(uri).pathname.substring(2); |