summaryrefslogtreecommitdiffstats
path: root/application/palemoon/components/statusbar/Status.jsm
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-10-01 14:34:08 +0200
committerGitHub <noreply@github.com>2018-10-01 14:34:08 +0200
commitab881a3bf513e591b6cc2966560cdab2b63a0f2a (patch)
treefef75d382fc6216a093eeaf80560473dff19d883 /application/palemoon/components/statusbar/Status.jsm
parent38e8ee1e6ddaa0cfd5fd9476264cbdcbc65c8035 (diff)
parent35a1adb07652813c886413e7c0eccda7c81d01d0 (diff)
downloadUXP-ab881a3bf513e591b6cc2966560cdab2b63a0f2a.tar
UXP-ab881a3bf513e591b6cc2966560cdab2b63a0f2a.tar.gz
UXP-ab881a3bf513e591b6cc2966560cdab2b63a0f2a.tar.lz
UXP-ab881a3bf513e591b6cc2966560cdab2b63a0f2a.tar.xz
UXP-ab881a3bf513e591b6cc2966560cdab2b63a0f2a.zip
Merge pull request #804 from JustOff/PR_s4e_FullScreenVideo
[PALEMOON] Use message manager to detect full-screen HTML5 video in S4E module
Diffstat (limited to 'application/palemoon/components/statusbar/Status.jsm')
-rw-r--r--application/palemoon/components/statusbar/Status.jsm20
1 files changed, 6 insertions, 14 deletions
diff --git a/application/palemoon/components/statusbar/Status.jsm b/application/palemoon/components/statusbar/Status.jsm
index d888c7d94..19e12ddfd 100644
--- a/application/palemoon/components/statusbar/Status.jsm
+++ b/application/palemoon/components/statusbar/Status.jsm
@@ -35,7 +35,7 @@ S4EStatusService.prototype =
_defaultStatus: { val: "", type: "" },
_isFullScreen: false,
- _isFullScreenVideo: false,
+ _isVideo: false,
_statusText: { val: "", type: "" },
_noUpdate: false,
@@ -222,18 +222,10 @@ S4EStatusService.prototype =
}
},
- updateFullScreen: function()
+ setFullScreenState: function(isFullScreen, isVideo)
{
- this._isFullScreen = this._window.fullScreen;
- this._isFullScreenVideo = false;
- if(this._isFullScreen)
- {
- let fsEl = this._window.content.document.mozFullScreenElement;
- if(fsEl && (fsEl.nodeName == "VIDEO" || fsEl.getElementsByTagName("VIDEO").length > 0))
- {
- this._isFullScreenVideo = true;
- }
- }
+ this._isFullScreen = isFullScreen;
+ this._isVideo = isFullScreen && isVideo;
this.clearStatusField();
this.updateStatusField(true);
@@ -305,7 +297,7 @@ S4EStatusService.prototype =
let label = null;
- if(this._isFullScreen && this._service.advancedStatusDetectFullScreen)
+ if(this._isFullScreen)
{
switch(location)
{
@@ -330,7 +322,7 @@ S4EStatusService.prototype =
break;
case 3: // Popup
default:
- if(this._isFullScreenVideo && this._service.advancedStatusDetectVideo)
+ if(this._isVideo)
{
return;
}