summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar z411 2019-03-31 05:14:22 -0300
committerLibravatar z411 2019-03-31 05:14:22 -0300
commit5c928375e1eb6888786971965d7ba06e21726a61 (patch)
tree208cb20df622a4c5f9482222388a17bb27a3cfab
parent4e0130e27503e8e8dfbeb57617b8ce83fcb0b233 (diff)
downloadbaitv-frontend-5c928375e1eb6888786971965d7ba06e21726a61.tar.gz
baitv-frontend-5c928375e1eb6888786971965d7ba06e21726a61.tar.xz
baitv-frontend-5c928375e1eb6888786971965d7ba06e21726a61.zip
Arreglada pantalla completa en Webkit
-rw-r--r--baitv.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/baitv.js b/baitv.js
index 93308af..91078fe 100644
--- a/baitv.js
+++ b/baitv.js
@@ -403,16 +403,17 @@ function on_hidecomments() {
}
}
+function fullscreenElement() {
+ return (document.fullscreenElement ||
+ document.webkitFullscreenElement ||
+ document.mozFullScreenElement ||
+ document.msFullscreenElement);
+}
+
function on_fullscreen() {
- var elem = document.getElementById("player");
-
- if (
- document.fullscreenElement || /* Standard syntax */
- document.webkitFullscreenElement || /* Chrome, Safari and Opera syntax */
- document.mozFullScreenElement ||/* Firefox syntax */
- document.msFullscreenElement /* IE/Edge syntax */
- ) {
- console.log("requesting exit full screen");
+ var elem = document.getElementById("player");
+
+ if (fullscreenElement()) {
if (document.exitFullscreen) {
document.exitFullscreen();
} else if (document.mozCancelFullScreen) { /* Firefox */
@@ -459,11 +460,10 @@ function fullscreen_move(e) {
}
function fullscreen_event() {
- console.log("fullscreen event");
var noticebox = document.getElementById("noticebox");
var base = document.getElementById("base");
- if(document.fullscreenElement) {
+ if(fullscreenElement()) {
base.style.position = "absolute";
base.style.opacity = "0.7";
noticebox.style.position = "absolute";