fixYoutubeEmbeds: fix when youtube decides to use http without s (#2155)
Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
parent
935d0a0a03
commit
f1f0da4a9d
|
@ -17,7 +17,7 @@ app.on("browser-window-created", (_, win) => {
|
||||||
frame.executeJavaScript(`
|
frame.executeJavaScript(`
|
||||||
new MutationObserver(() => {
|
new MutationObserver(() => {
|
||||||
if(
|
if(
|
||||||
document.querySelector('div.ytp-error-content-wrap-subreason a[href^="https://www.youtube.com/watch?v="]')
|
document.querySelector('div.ytp-error-content-wrap-subreason a[href*="www.youtube.com/watch?v="]')
|
||||||
) location.reload()
|
) location.reload()
|
||||||
}).observe(document.body, { childList: true, subtree:true });
|
}).observe(document.body, { childList: true, subtree:true });
|
||||||
`);
|
`);
|
||||||
|
|
Loading…
Reference in a new issue