Display error/retry in case of failure

This commit is contained in:
TC
2019-05-01 19:31:35 +02:00
parent 15275236b0
commit 5a1d7fbf23
3 changed files with 65 additions and 2 deletions

View File

@ -72,6 +72,13 @@ function createMainWindow() {
});
});
win.webContents.on("did-fail-load", () => {
if (isDev) {
console.log("did fail load");
}
win.webContents.loadFile(path.join(__dirname, "error.html"));
});
win.webContents.on("did-navigate-in-page", () => {
const url = win.webContents.getURL();
if (url.startsWith("https://music.youtube.com")) {