jslint edits

This commit is contained in:
Barbara Miller 2016-11-11 13:10:43 -08:00
parent d162a85a65
commit bb9334d757

View File

@ -41,7 +41,7 @@ var umbraInstagramBehavior = {
return;
}
if (this.idleSince == null) {
if (this.idleSince === null) {
console.log("nothing to do at the moment, might be waiting for something to load, setting this.idleSince=Date.now()");
this.idleSince = Date.now();
return;
@ -50,11 +50,8 @@ var umbraInstagramBehavior = {
console.log("finished loading-thumbs, it appears we have reached the bottom");
this.state = "clicking-first-thumb";
this.idleSince = null;
return;
} else {
// console.log("still might be waiting for something to load...");
return;
}
return;
}
}
@ -97,11 +94,11 @@ var umbraInstagramBehavior = {
start: function() {
var that = this;
this.intervalId = setInterval(function(){ that.intervalFunc() }, 300);
this.intervalId = setInterval(function(){ that.intervalFunc(); }, 300);
},
isFinished: function() {
if (this.idleSince != null) {
if (this.idleSince !== null) {
var idleTimeMs = Date.now() - this.idleSince;
if (idleTimeMs / 1000 > this.IDLE_TIMEOUT_SEC) {
clearInterval(this.intervalId);
@ -109,10 +106,10 @@ var umbraInstagramBehavior = {
}
}
return false;
},
}
};
// Called from outside of this script.
var umbraBehaviorFinished = function() { return umbraInstagramBehavior.isFinished() };
var umbraBehaviorFinished = function() { return umbraInstagramBehavior.isFinished(); };
umbraInstagramBehavior.start();