This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

hide overlay icon when in fullscreen mode (#1033)

- fixes #964
  • Loading branch information...
meandavejustice committed Sep 8, 2017
1 parent 79d300c commit f9f512be85f18b1638cb268b5c5f15308afee40f
Showing with 15 additions and 1 deletion.
  1. +15 −1 webextension/content-scripts/icon-overlay.js
@@ -7,6 +7,15 @@ injectStyle();
checkForEmbeds();
const overlayCheckInterval = setInterval(checkForEmbeds, 3000);
function onFullscreenChange() {
const el = document.querySelector('.minvid__overlay__container');
if (document.fullscreen) el.classList.add('fullscreen');
else el.classList.remove('fullscreen');
}
document.addEventListener('fullscreenchange', onFullscreenChange);

This comment has been minimized.

Show comment
Hide comment
@gauravkumar37

gauravkumar37 Sep 13, 2017

This still doesn't work. Acc to https://developer.mozilla.org/en-US/docs/Web/Events/fullscreenchange, the API is still vendor-prefixed in browsers implementing it.
Correct: document.addEventListener('mozfullscreenchange', onFullscreenChange);
Verified on FF55.

@gauravkumar37

gauravkumar37 Sep 13, 2017

This still doesn't work. Acc to https://developer.mozilla.org/en-US/docs/Web/Events/fullscreenchange, the API is still vendor-prefixed in browsers implementing it.
Correct: document.addEventListener('mozfullscreenchange', onFullscreenChange);
Verified on FF55.

This comment has been minimized.

Show comment
Hide comment
@SoftVision-PaulOiegas

SoftVision-PaulOiegas Sep 13, 2017

Collaborator

This seems to be only reproducing on the new YouTube UI that is still in development and not fully supported yet by Min Vid.
Just verified on old UI and the overlay is no longer present in Full Screen.

@SoftVision-PaulOiegas

SoftVision-PaulOiegas Sep 13, 2017

Collaborator

This seems to be only reproducing on the new YouTube UI that is still in development and not fully supported yet by Min Vid.
Just verified on old UI and the overlay is no longer present in Full Screen.

This comment has been minimized.

Show comment
Hide comment
@gauravkumar37

gauravkumar37 Sep 13, 2017

Aah, I think it's the HTML5 material design UI you're talking about. I am using the new UI and Min Vid works fine for me, except the fullscreen change. Can we cater to both mozfullscreenchange and fullscreenchange?

@gauravkumar37

gauravkumar37 Sep 13, 2017

Aah, I think it's the HTML5 material design UI you're talking about. I am using the new UI and Min Vid works fine for me, except the fullscreen change. Can we cater to both mozfullscreenchange and fullscreenchange?

This comment has been minimized.

Show comment
Hide comment
@SoftVision-PaulOiegas

SoftVision-PaulOiegas Sep 13, 2017

Collaborator

Yes, I'm referring to the Material design. I will let @meandavejustice to answer on this matter since he's the developer. I'm QA-ing for the experiment. 😃

@SoftVision-PaulOiegas

SoftVision-PaulOiegas Sep 13, 2017

Collaborator

Yes, I'm referring to the Material design. I will let @meandavejustice to answer on this matter since he's the developer. I'm QA-ing for the experiment. 😃

This comment has been minimized.

Show comment
Hide comment
@meandavejustice
@meandavejustice

meandavejustice Sep 13, 2017

Owner

Thanks @gauravkumar37 just filed #1042

function onMessage(opts) {
const title = opts.title;
delete opts.title;
@@ -460,12 +469,17 @@ function injectStyle() {
opacity: 1;
}
.minvid__overlay__container.fullscreen {
display: none;
}
@keyframes fade {
0% {opacity: 0}
5%, 80% {opacity: 1}
100% {opacity: 0}
}
`;
`;
const head = document.head;
const style = document.createElement('style');

0 comments on commit f9f512b

Please sign in to comment.