Showing 509 of 1,320 total issues
Avoid deeply nested control flow statements. Open
Open
if (b.pending_build) {
var buildLength = b.pending_build.seconds_remaining*1;
if (buildLength > buildQueueTotal) {
buildQueueTotal = buildLength;
}
Avoid deeply nested control flow statements. Open
Open
for (var ore_i in ores) {
var ore = ores[ore_i];
if(obj[ore + '_hour'] > 0) {
outOre.push('<li><label>' + ore.replace(/^\w/, function(c){ return c.toUpperCase() }) + ':</label> ');
outOre.push(obj[ore+'_hour']);
Avoid deeply nested control flow statements. Open
Open
if(this.work && this.work.seconds_remaining && this.work.seconds_remaining*1 > 0) {
ce.appendChild(this.RecycleGetTimeDisplay(o.result.recycle, water, ore, energy));
this.addQueue(this.work.seconds_remaining, this.RecycleQueue, "recycleTime", this);
}
else {
Avoid deeply nested control flow statements. Open
Open
if(Lang.isArray(resource)) {
for(x=0; x < resource.length; x++) {
name = resource[x];
if(stash.stored[name]) {
nLi = li.cloneNode(false);
Avoid deeply nested control flow statements. Open
Open
if(ship.from.empire && ship.from.empire.name) {
nLi.innerHTML = ship.from.name + ' <span style="cursor:pointer;">[' + ship.from.empire.name + ']</span>';
Event.on(nLi, "click", this.EmpireProfile, ship.from.empire);
}
else {
Avoid deeply nested control flow statements. Open
Open
if(Lacuna.MapStar._map.tileCache[cp.x] && Lacuna.MapStar._map.tileCache[cp.x][cp.y]) {
delete Lacuna.MapStar._map.tileCache[cp.x][cp.y]; // Remove the planet from the cache
}
Avoid deeply nested control flow statements. Open
Open
for (var j=0; j<options.length; j++) {
typeSelector = typeSelector + [
'<option value="', options[j], '">', options[j], '</option>'
].join('');
}
Avoid deeply nested control flow statements. Open
Open
if(Dom.getStyle("tradeAddPrisonerName", "display") == "none") {
Dom.setStyle("tradeAddPrisonerName", "display", "block");
this.getPrisoners();
}
else {
Avoid deeply nested control flow statements. Open
Open
for(x=0; x < resource.length; x++) {
name = resource[x];
option = document.createElement("option");
option.setAttribute("value", name);
option.innerHTML = name.titleCaps();
Avoid deeply nested control flow statements. Open
Open
else if(resource) {
option = document.createElement("option");
option.setAttribute("value", r);
option.innerHTML = r.titleCaps();
Avoid deeply nested control flow statements. Open
Open
if(filters[tags[t]]){
filterMatch++;
}
Avoid deeply nested control flow statements. Open
Open
if(!cur[orig[s]]) {
isDirty = true;
break;
}
Avoid deeply nested control flow statements. Open
Open
if (obj.type == this.type) {
opts[opts.length] = '<option value="' + obj.id + '">' + obj.name + '</option>';
}
Avoid deeply nested control flow statements. Open
Open
if(Dom.getStyle("tradeAddResourceName", "display") == "none") {
Dom.setStyle("tradeAddResourceName", "display", "block");
this.getStoredResources();
}
else {
Avoid deeply nested control flow statements. Open
Open
if(Lang.isArray(resource)) {
for(x=0; x < resource.length; x++) {
name = resource[x];
if(this.resources[name]) {
nLi = li.cloneNode(false);
Avoid deeply nested control flow statements. Open
Open
if(Dom.getStyle("tradePushResourceName", "display") == "none") {
Dom.setStyle("tradePushResourceName", "display", "block");
this.getStoredResources();
}
else {
Avoid deeply nested control flow statements. Open
Open
if(Dom.getStyle("tradePushPrisonerName", "display") == "none") {
Dom.setStyle("tradePushPrisonerName", "display", "block");
this.getPrisoners();
}
else {
Avoid deeply nested control flow statements. Open
Open
if(img.link) {
imgDiv.innerHTML = [
'<a href="',img.link,'" title="',img.title,'" target="_blank"><img src="',img.url,'" alt="',img.title,'" title="',img.title,'" /></a>'
].join('');
}
Avoid deeply nested control flow statements. Open
Open
if(Dom.getStyle("tradePushPlanSummaryName", "display") == "none") {
Dom.setStyle("tradePushPlanSummaryName", "display", "block");
this.getPlanSummary();
}
else {
Avoid deeply nested control flow statements. Open
Open
if(!Dom.inDocument(this._elGrid)) {
document.getElementById("content").appendChild(this._elGrid);
}