fixYoutubeEmbeds - Support locales other than english (#2128)
Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
parent
115da04724
commit
8b3189f1ed
1 changed files with 3 additions and 2 deletions
|
@ -16,8 +16,9 @@ app.on("browser-window-created", (_, win) => {
|
||||||
|
|
||||||
frame.executeJavaScript(`
|
frame.executeJavaScript(`
|
||||||
new MutationObserver(() => {
|
new MutationObserver(() => {
|
||||||
let err = document.querySelector(".ytp-error-content-wrap-subreason span")?.textContent;
|
if(
|
||||||
if (err && err.includes("blocked it from display")) window.location.reload()
|
document.querySelector('div.ytp-error-content-wrap-subreason a[href^="https://www.youtube.com/watch?v="]')
|
||||||
|
) location.reload()
|
||||||
}).observe(document.body, { childList: true, subtree:true });
|
}).observe(document.body, { childList: true, subtree:true });
|
||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue