diff --git a/static/remoteMap.js b/static/remoteMap.js index c33dc36b..762fd746 100644 --- a/static/remoteMap.js +++ b/static/remoteMap.js @@ -1,10 +1,10 @@ function getParameterByName(name, url) { - if (!url) url = window.location.href; + if(!url) url = window.location.href; name = name.replace(/[\[\]]/g, "\\$&"); var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), results = regex.exec(url); - if (!results) return null; - if (!results[2]) return ''; + if(!results) return null; + if(!results[2]) return ''; return decodeURIComponent(results[2].replace(/\+/g, " ")); } remoteMapConfig = { @@ -226,8 +226,9 @@ for(let i = 1; i <= 3; i++){ x:-1, y:-1, }, - }, - entityDrawRules["assembling-machine-"+i] = assemblingMachineTemplate; + }; + let name = "assembling-machine-"+i; + entityDrawRules[name] = assemblingMachineTemplate; } function drawEntity(entity, dontCache){ if(entity.x && entity.y){