Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable Opera's HTML video pop-out button

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

like image 336
Single Entity Avatar asked Jul 05 '16 15:07

Single Entity


People also ask

What is enable video pop out?

Video pop-out lets you watch online videos on top of other windows so you can continue browsing or working at the same time.


3 Answers

// Hide Opera detach video popup button
// May remove other useful browser popups, inserted after "body" element.
html > div[style] {
  display: none !important;
}
like image 92
Alexander Shostak Avatar answered Oct 05 '22 17:10

Alexander Shostak


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.

like image 30
Sollace Avatar answered Oct 05 '22 18:10

Sollace


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.

like image 45
Trigga Avatar answered Oct 05 '22 18:10

Trigga