Reputation: 318
I'm watching a course online and it has the option to autoplay the videos but every time a video ends I need to set it to fullscreen again.
To set the vide to fullscreen using console, I can use document.getElementsByTagName('VIDEO')[0].requestFullscreen()
and I was wondering if it's possible to make that this line be executed alwasys on page load.
Is this even possible? If yes, how can I do it?
Upvotes: 3
Views: 3893
Reputation: 371019
One option is to use a userscript - install a userscript manager like Tampermonkey, go to the dashboard, press the "+" button to create a new script, and then type in the Javascript you want to execute whenever you load the page.
Upvotes: 4