mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 02:31:45 +00:00
Display error/retry in case of failure
This commit is contained in:
7
index.js
7
index.js
@ -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")) {
|
||||
|
||||
Reference in New Issue
Block a user