fixYoutubeEmbeds - Support locales other than english (#2128)
Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
parent
115da04724
commit
8b3189f1ed
|
@ -16,8 +16,9 @@ app.on("browser-window-created", (_, win) => {
|
|||
|
||||
frame.executeJavaScript(`
|
||||
new MutationObserver(() => {
|
||||
let err = document.querySelector(".ytp-error-content-wrap-subreason span")?.textContent;
|
||||
if (err && err.includes("blocked it from display")) window.location.reload()
|
||||
if(
|
||||
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 });
|
||||
`);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue