fix some javascript code style issues
This commit is contained in:
parent
8a46922e77
commit
dc5ac081ce
@ -1,6 +1,6 @@
|
||||
function Measurement() {
|
||||
this.reset();
|
||||
};
|
||||
}
|
||||
|
||||
Measurement.prototype.add = function(v) {
|
||||
this.value += v;
|
||||
@ -25,7 +25,7 @@ Measurement.prototype.reset = function() {
|
||||
|
||||
Measurement.prototype.report = function(range, interval, callback) {
|
||||
return new Reporter(this, range, interval, callback);
|
||||
}
|
||||
};
|
||||
|
||||
function Reporter(measurement, range, interval, callback) {
|
||||
this.measurement = measurement;
|
||||
@ -33,7 +33,7 @@ function Reporter(measurement, range, interval, callback) {
|
||||
this.samples = [];
|
||||
this.callback = callback;
|
||||
this.interval = setInterval(this.report.bind(this), interval);
|
||||
};
|
||||
}
|
||||
|
||||
Reporter.prototype.sample = function(){
|
||||
this.samples.push({
|
||||
|
@ -1973,7 +1973,7 @@ function update_dmr_timeslot_filtering() {
|
||||
function playButtonClick() {
|
||||
//On iOS, we can only start audio from a click or touch event.
|
||||
audioEngine.start(onAudioStart);
|
||||
$overlay = $('#openwebrx-autoplay-overlay');
|
||||
var $overlay = $('#openwebrx-autoplay-overlay');
|
||||
$overlay.css('opacity', 0);
|
||||
$overlay.on('transitionend', function() {
|
||||
$overlay.hide();
|
||||
@ -2051,7 +2051,7 @@ function initPanels() {
|
||||
el.style.transitionDuration = null;
|
||||
el.style.transitionDelay = null;
|
||||
el.style.transitionProperty = null;
|
||||
if (el.movement && el.movement == 'collapse') {
|
||||
if (el.movement && el.movement === 'collapse') {
|
||||
el.style.display = 'none';
|
||||
}
|
||||
});
|
||||
@ -2221,16 +2221,14 @@ function secondary_demod_push_data(x) {
|
||||
var c = y.charCodeAt(0);
|
||||
return (c === 10 || (c >= 32 && c <= 126));
|
||||
}).map(function (y) {
|
||||
if (y === "&"
|
||||
)
|
||||
if (y === "&")
|
||||
return "&";
|
||||
if (y === "<") return "<";
|
||||
if (y === ">") return ">";
|
||||
if (y === " ") return " ";
|
||||
return y;
|
||||
}).map(function (y) {
|
||||
if (y === "\n"
|
||||
)
|
||||
if (y === "\n")
|
||||
return "<br />";
|
||||
return "<span class=\"part\">" + y + "</span>";
|
||||
}).join("");
|
||||
|
Loading…
Reference in New Issue
Block a user