Open cvzi opened 1 year ago
Please be reminded that PIP requires user-interaction. You cannot suddenly popup that window without user clicking. (like auto lyrics)
And Firefox nevers support PIP.
YouTube uses popup window to do such kind of feature.
window.open(
'https://github.com/cvzi/genius-lyrics-userscript/issues/53',
'0.a.random.name',
'menubar=0,location=0,scrollbars=0,toolbar=0,width=600,height=600'
);
This will create a window object and you can use postMessage
and addEventListener('message', ...)
to communicate with the main window.
You can use that robots.txt
to hack your script in that window, by detecting the window.name
In Chrome 111+ it's possible to show an always-on-top window with HTML content, previously only a video could be shown like this. This could be used to show the lyrics even if Youtube/Spotify tab is in the background.
A website that uses this: https://lazy-guy.github.io/tomodoro/index.html