mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-14 03:41:46 +00:00
lint
This commit is contained in:
@ -15,4 +15,4 @@ module.exports = () => {
|
|||||||
videoStream.yns_pause();
|
videoStream.yns_pause();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|||||||
@ -10,17 +10,16 @@ ipcRenderer.on("update-song-info", async (_, extractedSongInfo) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const injectListener = () => {
|
const injectListener = () => {
|
||||||
var oldXHR = window.XMLHttpRequest;
|
const oldXHR = window.XMLHttpRequest;
|
||||||
function newXHR() {
|
function newXHR() {
|
||||||
var realXHR = new oldXHR();
|
const realXHR = new oldXHR();
|
||||||
realXHR.addEventListener(
|
realXHR.addEventListener(
|
||||||
"readystatechange",
|
"readystatechange",
|
||||||
() => {
|
() => {
|
||||||
if (realXHR.readyState == 4 && realXHR.status == 200) {
|
if (realXHR.readyState === 4 && realXHR.status === 200
|
||||||
if (realXHR.responseURL.includes("/player")) {
|
&& realXHR.responseURL.includes("/player")) {
|
||||||
// if the request contains the song info, send the response to ipcMain
|
// if the request contains the song info, send the response to ipcMain
|
||||||
ipcRenderer.send("song-info-request", realXHR.responseText);
|
ipcRenderer.send("song-info-request", realXHR.responseText);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
false
|
false
|
||||||
|
|||||||
Reference in New Issue
Block a user