Commit 49bd3567 by jmclaus

Used chaining. Cached gettext call.

parent 585751ff
...@@ -59,16 +59,22 @@ function () { ...@@ -59,16 +59,22 @@ function () {
// *************************************************************** // ***************************************************************
function onQualityChange(value) { function onQualityChange(value) {
var controlStateStr;
this.videoQualityControl.quality = value; this.videoQualityControl.quality = value;
if (_.indexOf(this.config.availableQualities, value) !== -1) { if (_.indexOf(this.config.availableQualities, value) !== -1) {
this.videoQualityControl.el.addClass('active'); controlStateStr = gettext('HD on');
this.videoQualityControl.el.attr('title', gettext('HD on')) this.videoQualityControl.el
.text(gettext('HD on')); .addClass('active')
.attr('title', controlStateStr)
.text(controlStateStr);
} else { } else {
this.videoQualityControl.el.removeClass('active'); controlStateStr = gettext('HD off');
this.videoQualityControl.el.attr('title', gettext('HD off')) this.videoQualityControl.el
.text(gettext('HD off')); .removeClass('active')
.attr('title', controlStateStr)
.text(controlStateStr);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment