diff options
author | JustOff <Off.Just.Off@gmail.com> | 2018-10-01 15:02:11 +0300 |
---|---|---|
committer | JustOff <Off.Just.Off@gmail.com> | 2018-10-01 15:02:11 +0300 |
commit | 35a1adb07652813c886413e7c0eccda7c81d01d0 (patch) | |
tree | 1e49f9238d4a3a00d0b3f0db7d94465b9ccc8640 /application/palemoon/components/statusbar/Status.jsm | |
parent | ec4c6dd42abcbf6fd081ce3da1dbf1b5ea9c0d8f (diff) | |
download | UXP-35a1adb07652813c886413e7c0eccda7c81d01d0.tar UXP-35a1adb07652813c886413e7c0eccda7c81d01d0.tar.gz UXP-35a1adb07652813c886413e7c0eccda7c81d01d0.tar.lz UXP-35a1adb07652813c886413e7c0eccda7c81d01d0.tar.xz UXP-35a1adb07652813c886413e7c0eccda7c81d01d0.zip |
[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.jsm | 20 |
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; } |