In Opera (and only Opera), a HTML5 video comes with a button at the top which allows you to pop the video out of the webpage.
Is there a way to disable this in javascript, jquery or CSS?
Here is a similar post, but doesn't explain how to disable it without user intervention, I need something programmatic:
HTML5 Video button on top - Opera Browser
Video pop-out lets you watch online videos on top of other windows so you can continue browsing or working at the same time.
// Hide Opera detach video popup button
// May remove other useful browser popups, inserted after "body" element.
html > div[style] {
display: none !important;
}
Found this when testing opera with a site I'm working. Hated it immediately.
Here's some css to hide it:
body + div[is-visible] {
display: none !important;
}
Edit: Some more details.
Firstly, this is was done with reference to Opera 39 on desktop. Other versions may be slightly different but hopefully this has enough information that someone else can help come up with a solution that works in them too.
I found the button is attached to the document in a div at the bottom of the page (directly after the body element). You can see it in the browser using the page inspector.
The button itself seems to be part of the DOM so there's no way to apply css to it directly, so I've had to get about that by hiding it's container (the div).
The is-visible attribute is only really there to keep from confusing it with other elements. Best I can tell that attribute is only used in Opera.
This does the trick for me:
#detach-button-host {
display: none !important;
}
I know this question was asked years ago but I think that my solution is better than the other approaches.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With