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