diff options
author | Ascrod <32915892+Ascrod@users.noreply.github.com> | 2019-02-09 14:05:34 -0500 |
---|---|---|
committer | Ascrod <32915892+Ascrod@users.noreply.github.com> | 2019-02-09 14:05:34 -0500 |
commit | 9630e9c7d0a5b22289f23e2205e6e59e454be8a3 (patch) | |
tree | f76d4988d87d0345af7375acb4b8097a7fd6dd1f /application/palemoon/base/content/nsContextMenu.js | |
parent | 93dd680b2f33fc7701880bf412378854dd95c3d9 (diff) | |
download | uxp-9630e9c7d0a5b22289f23e2205e6e59e454be8a3.tar.gz |
Pale Moon: Add loop context menu to HTML5 media elements.
Diffstat (limited to 'application/palemoon/base/content/nsContextMenu.js')
-rw-r--r-- | application/palemoon/base/content/nsContextMenu.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/application/palemoon/base/content/nsContextMenu.js b/application/palemoon/base/content/nsContextMenu.js index 1d4f888165..916dd2637a 100644 --- a/application/palemoon/base/content/nsContextMenu.js +++ b/application/palemoon/base/content/nsContextMenu.js @@ -381,6 +381,7 @@ nsContextMenu.prototype = { this.showItem("context-media-mute", onMedia && !this.target.muted); this.showItem("context-media-unmute", onMedia && this.target.muted); this.showItem("context-media-playbackrate", onMedia); + this.showItem("context-media-loop", onMedia); this.showItem("context-media-showcontrols", onMedia && !this.target.controls); this.showItem("context-media-hidecontrols", onMedia && this.target.controls); this.showItem("context-video-fullscreen", this.onVideo && this.target.ownerDocument.mozFullScreenElement == null); @@ -394,6 +395,7 @@ nsContextMenu.prototype = { this.setItemAttr("context-media-playbackrate-100x", "checked", this.target.playbackRate == 1.0); this.setItemAttr("context-media-playbackrate-150x", "checked", this.target.playbackRate == 1.5); this.setItemAttr("context-media-playbackrate-200x", "checked", this.target.playbackRate == 2.0); + this.setItemAttr("context-media-loop", "checked", this.target.loop); var hasError = this.target.error != null || this.target.networkState == this.target.NETWORK_NO_SOURCE; this.setItemAttr("context-media-play", "disabled", hasError); @@ -1531,6 +1533,9 @@ nsContextMenu.prototype = { case "pause": media.pause(); break; + case "loop": + media.loop = !media.loop; + break; case "mute": media.muted = true; break; |