var project={"_id":"5b4c3269ab233e8499f6d11a","id":"e2d9b5942bfb1218e7d4bdb277b0cd4c99bc35dd","name":"NOTAM Survey with Prediction","user":"566ac9850286a8f9080cdd79","description":"Survey to classify NOTAMS","created":"2017-11-22T14:09:16.475Z","shared":false,"server":"micro","datafiles":[{"file":{"link":"http://api.anbdata.com/anb/states/notams/random/list?n=10","type":"URL/API","url":"http://api.anbdata.com/anb/states/notams/random/list?n=10","message":{"error":false,"text":""}},"varname":"notams","title":"Notams","activated":true,"name":"datafile","linkedtofile":true,"optional":true,"content":"","sendtojs":false},{"file":{"link":"http://api.anbdata.com/anb/states/notams/random/stats","type":"URL/API","url":"http://api.anbdata.com/anb/states/notams/random/stats","message":{"error":false,"text":""}},"varname":"stats","title":"stats","activated":true,"name":"datafile","linkedtofile":true,"optional":true,"content":"","sendtojs":true}],"packs":["bootstrap","highcharts","jquery"],"container":"mainpart","js":{"file":{"type":"","url":"","link":"","message":{"error":true,"text":"File not defined"},"depurl":"https://quipslibistars.s3.amazonaws.com/prod/e2d9b5942bfb1218e7d4bdb277b0cd4c99bc35dd/script.js"},"title":"Javascript","activated":true,"name":"js","linkedtofile":false,"optional":true,"content":"$(\".qtable input\").click(function(e){\n var data={sid:Number($(this).closest(\"table\").attr(\"sid\")),\n message:$(this).closest(\"tr\").find(\".question\").text(),\n criticality:$(this).val()\n }\n //console.log(data)\n $.getJSON(\"https://api.anbdata.com/anb/states/notams/random/save?callback=?\",{data:JSON.stringify(data)},\n function(res){\n //console.log(res)\n }\n )\n c1.series[0].points[0].update($(\".qtable input:checked\").length)\n c2.series[0].points[0].update($(\".qtable input:checked\").length+stats.value)\n if ($(\".qtable input:checked\").length==10) {\n $(\"#done\").removeAttr(\"disabled\")\n }\n\n})\n$(\"#ask\").click(function(e){\n e.preventDefault()\n var notam=$(\"#asknotam\").val()\n //console.log(notam)\n var me=$(\"#chatzonedefault .r1\").clone(true)\n me.find(\".qdate\").text(new Date().toISOString())\n me.find(\".mynotam\").text(notam)\n $(\"#chatzone\").append(me)\n \n me.fadeIn('slow',function(){\n if ($(\"#chatzone .r1\").length>1) $(\"#chatzone .r1:eq(0)\").fadeOut('slow',function(){$(\"#chatzone .r1:eq(0)\").remove()})\n if ($(\"#chatzone .r2\").length==3) {\n $(\"#chatzone .r2:lt(3)\").attr(\"action\",\"delete\")\n $(\"#chatzone .r2[action='delete']\").fadeOut('slow',function(){\n $(\"#chatzone .r2[action='delete']\").remove()\n \n })\n }\n\n\n\n var norm=$(\"#chatzonedefault .r2\").clone(true)\n $(\"#chatzone\").append(norm)\n norm.fadeIn('slow',function(){\n //console.log($(\"#chatzone .r2\").length)\n \n \n $.getJSON(\"https://api.anbdata.com/anb/states/notams/qcode?callback=?\",{notam:notam,decodeobj:true},\n function(res){\n //console.log(res)\n norm.find(\".typing\").hide()\n if (res.decode.area.Area==\"Other Information\" && res.decode.condition.Area==\"Other Information\") {\n norm.find(\".response\").text(\"Not sure what this NOTAM relates to.\")\n \n }\n else if (res.decode.area.Area==\"Other Information\") {\n norm.find(\".response\").text(\"This NOTAM is related to some \"+res.decode.condition.Area.toLowerCase()+\".\")\n }\n else if (res.decode.condition.Area.toLowerCase()==\"other\") {\n norm.find(\".response\").text(\"This NOTAM is related to \"+(res.decode.area.Area.toUpperCase()==res.decode.area.Area?res.decode.area.Area:res.decode.area.Area.toLowerCase())+\".\") \n }\n else\n {\n norm.find(\".response\").text(\"This NOTAM is related to \"+res.decode.condition.Area.toLowerCase()\n +\" of \"+(res.decode.area.Area.toUpperCase()==res.decode.area.Area?res.decode.area.Area:res.decode.area.Area.toLowerCase())+\".\")\n }\n if ($(\"#lang\").val()!=\"en\") {\n translate(norm.find(\".response\").text(),$(\"#lang\").val(),function(text){\n norm.find(\".response\").html(text)\n norm.find(\".response\").show()\n })\n }\n else {\n norm.find(\".response\").show()\n }\n var norm2=$(\"#chatzonedefault .r2\").clone(true)\n $(\"#chatzone\").append(norm2)\n norm2.fadeIn('slow',function(){\n norm2.find(\".typing\").hide()\n norm2.find(\".normname\").hide()\n norm2.find(\".response\").text(res.meaning+\".\")\n if ($(\"#lang\").val()!=\"en\") {\n translate(norm2.find(\".response\").text(),$(\"#lang\").val(),function(text){\n norm2.find(\".response\").html(text)\n norm2.find(\".response\").show()\n })\n }\n else {\n norm2.find(\".response\").show()\n }\n var norm3=$(\"#chatzonedefault .r2\").clone(true)\n $(\"#chatzone\").append(norm3)\n norm3.fadeIn('slow',function(){\n \n \n $.getJSON(\"https://api.anbdata.com/anb/states/notams/criticality?callback=?\",{notam:notam,version:3},\n function(res){\n //console.log(res)\n norm3.find(\".typing\").hide()\n norm3.find(\".normname\").hide()\n norm3.find(\".response\").text(\"On a scale from 1 to 5, I would give this NOTAM a criticality of \"+(res.criticality+1)+\".\")\n if ($(\"#lang\").val()!=\"en\") {\n translate(norm3.find(\".response\").text(),$(\"#lang\").val(),function(text){\n norm3.find(\".response\").html(text)\n norm3.find(\".response\").show()\n })\n }\n else {\n norm3.find(\".response\").show()\n }\n if ($(\"#lang\").val()!=\"en\") {\n translate(norm3.find(\".eval[name='\"+res.criticality+\"']\").text(),$(\"#lang\").val(),function(text){\n norm3.find(\".eval[name='\"+res.criticality+\"']\").html(text)\n norm3.find(\".eval[name='\"+res.criticality+\"']\").show()\n })\n }\n else {\n norm3.find(\".eval[name='\"+res.criticality+\"']\").show()\n }\n \n \n\n })\n })\n })\n \n })\n })\n })\n})\n\nfunction translate(text,target,next){\n $.getJSON(\"https://api.anbdata.com/anb/services/translate?callback=?\",{data:JSON.stringify([text]),target:target},\n function(res){\n //console.log(res)\n next(res.data.translations[0].translatedText) \n })\n}\n\n$(\"#done\").click(function(e){\n e.preventDefault()\n var x=confirm(\"Great Job! Well Done! Want to go for another round of 10?\");\n if (x) document.location.href=document.location.href.split(\"?\")[0]\n else document.location.href=document.location.href.split(\"?\")[0]+\"?finished=true\"\n \n})\nif (document.location.href.indexOf(\"finished\")>=0) {\n $(\"#maincontent\").hide()\n $(\"#finished\").show()\n}\nelse {\n //updategraph()\n //updatenormgraph()\n}\nvar c1,c2\n setInterval(rotate, 1000);\nfunction rotate(){\n $(\".typ\").each(function(i,v){\n switch ($(v).attr(\"value\")) {\n case \"high\":\n $(v).attr(\"value\",\"med\")\n $(v).removeClass(\"high\")\n $(v).addClass(\"med\")\n break;\n case \"med\":\n $(v).attr(\"value\",\"low\")\n $(v).removeClass(\"med\")\n $(v).addClass(\"low\")\n break;\n default :\n $(v).attr(\"value\",\"high\")\n $(v).removeClass(\"low\")\n $(v).addClass(\"high\")\n break;\n }\n })\n \n}\nfunction updategraph(){\n c1=Highcharts.chart('yournotams', {\n credits:{\n enabled:false\n },\n chart: {\n type: 'bar'\n },\n title: {\n text: 'Help us by rating 10 NOTAMS'\n },\n xAxis: {\n categories: ['Rated NOTAMS']\n },\n yAxis: {\n min: 0,\n max:10,\n tickInterval:1,\n title: {\n text: ''\n }\n },\n legend: {\n enabled:false\n },\n\n series: [{\n color:\"green\",\n dataLabels:{enabled:true},\n name: 'NOTAMS reviewed so far',\n data: [$(\".qtable input:checked\").length]\n }]\n});\n}\n\nfunction updatenormgraph(){\n c2=Highcharts.chart('normgraph', {\n credits:{\n enabled:false\n },\n chart: {\n type: 'gauge',\n plotBackgroundColor: null,\n plotBackgroundImage: null,\n plotBorderWidth: 0,\n plotShadow: false\n },\n\n title: {\n text: \"Norm's Current Knowledge\"\n },\n subtitle:{\n text:\"Number of NOTAMS rated so far\"\n },\n\n pane: {\n startAngle: -150,\n endAngle: 150,\n background: [{\n backgroundColor: {\n linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },\n stops: [\n [0, '#FFF'],\n [1, '#333']\n ]\n },\n borderWidth: 0,\n outerRadius: '109%'\n }, {\n backgroundColor: {\n linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },\n stops: [\n [0, '#333'],\n [1, '#FFF']\n ]\n },\n borderWidth: 1,\n outerRadius: '107%'\n }, {\n // default background\n }, {\n backgroundColor: '#DDD',\n borderWidth: 0,\n outerRadius: '105%',\n innerRadius: '103%'\n }]\n },\n\n // the value axis\n yAxis: {\n min: 0,\n max: 22000,\n\n minorTickInterval: 'auto',\n minorTickWidth: 1,\n minorTickLength: 10,\n minorTickPosition: 'inside',\n minorTickColor: '#666',\n\n tickPixelInterval: 30,\n tickWidth: 2,\n tickPosition: 'inside',\n tickLength: 10,\n tickColor: '#666',\n labels: {\n step: 2,\n rotation: 'auto'\n },\n title: {\n text: new Date().toISOString().substring(0,10),\n style:{\n fontSize:\"6px\",\n fontWeight:\"bold\"\n }\n },\n plotBands: [{\n from: 0,\n to: 8000,\n color: '#DF5353'\n },{\n from: 8000,\n to: 15000,\n color: '#FFA500' // orange\n }, {\n from: 15000,\n to: 20000,\n color: '#DDDF0D' // yellow\n }, {\n from: 20000,\n to: 22000,\n color: '#55BF3B'\n }]\n },\n\n series: [{\n name: 'Rated NOTAMS',\n data: [stats.value]\n }]\n\n})\n}\n\n\n"},"css":{"file":{"type":"","url":"","link":"","message":{"error":true,"text":"File not defined"}},"title":"Cascading Style Sheet (CSS)","activated":true,"name":"css","linkedtofile":false,"optional":true,"content":"\n#y2table tbody tr {\n font-size:8px !important;\n line-height:8px !important;\n}\n.ff {\n margin-top:2px;\n}\n.norm {\n float:left;\n width:300px;\n}\n.me {\n float:right;\n width:300px;\n text-align:right;\n}\n.high {\n color:#C8C8C8;\n}\n.med {\n color:#D8D8D8;\n}\n.low {\n color:#E8E8E8;\n}\n#y2table tbody tr:last-child td {\n font-size:medium !important;\n border-top-width:5px !important;\n}\n.tt-query, /* UPDATE: newer versions use tt-input instead of tt-query */\n.tt-hint {\n height: 30px;\n padding: 8px 12px;\n font-size: 24px;\n line-height: 30px;\n border: 2px solid #ccc;\n border-radius: 8px;\n outline: none;\n}\n\n.tt-query { /* UPDATE: newer versions use tt-input instead of tt-query */\n box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);\n}\n\n.tt-hint {\n color: #999;\n}\n\n.tt-menu { /* UPDATE: newer versions use tt-menu instead of tt-dropdown-menu */\n margin-top: 12px;\n padding: 8px 0;\n background-color: #fff;\n border: 1px solid #ccc;\n border: 1px solid rgba(0, 0, 0, 0.2);\n border-radius: 8px;\n box-shadow: 0 5px 10px rgba(0,0,0,.2);\n}\n\n.tt-suggestion {\n padding: 3px 20px;\n font-size: 18px;\n line-height: 24px;\n}\n\n.tt-suggestion.tt-is-under-cursor { /* UPDATE: newer versions use .tt-suggestion.tt-cursor */\n color: #fff;\n background-color: #0097cf;\n\n}\n\n.tt-suggestion p {\n margin: 0;\n}\n.scrollable-dropdown-menu .tt-menu {\n max-height: 150px;\n overflow-y: auto;\n}\n#y2table thead th,td.qtd span,.control-label,.help-block,p,#inspections tr td,#inspections tr,#theschedule tr,.checkbox,#theschedule tr td{\n font-size:14px;\n}\n.panel-heading h2 {\n font-size:30px;\n}\n.headtext {\n font-size:20px;\n}\n#y2table tbody td,.qtable tbody td{\n border-top:1px solid #ddd;\n}\n.into p, .into {\n font-size:16px;\n}"},"jade":{"file":{"type":"","url":"","link":"","message":{"error":true,"text":"File not defined"},"depurl":"https://quipslibistars.s3.amazonaws.com/prod/e2d9b5942bfb1218e7d4bdb277b0cd4c99bc35dd/main.jade"},"title":"Jade","activated":true,"name":"jade","linkedtofile":false,"optional":false,"content":"#finished.container(style=\"width:900px;display:none\")\n .row\n .col-md-6\n img(style=\"float:left\",src=\"https://copanational.org/sites/copanational.org/wp-content/uploads/2017/09/icao.png\",height=\"150px\")\n .col-md-6\n img(style=\"float:right\",src=\"https://s3.amazonaws.com/istarsshare/Lightening+OPG+2+newlogo.png\",width=\"350px\")\n .jumbotron\n h1 Thank you for taking the survey! Norm got a lot smarter already!\n a(href=\"http://quips.anbdata.com/project/prod/e2d9b5942bfb1218e7d4bdb277b0cd4c99bc35dd.html\") Take another round of 10 NOTAMS\n#maincontent.container(style=\"width:900px\")\n .row\n .col-md-6\n img(style=\"float:left\",src=\"https://copanational.org/sites/copanational.org/wp-content/uploads/2017/09/icao.png\",height=\"150px\")\n .col-md-6\n img(style=\"float:right\",src=\"https://s3.amazonaws.com/istarsshare/Lightening+OPG+2+newlogo.png\",width=\"350px\")\n .row\n //.col-md-5\n .col-md-12\n .titlepan\n h1 Norm in action\n .alert.alert-success 28 May 2019 - NORM Update with retrainied model of 30000+ NOTAMS\n \n .row\n //.col-md-5\n // #normgraph(style=\"width:400px;height:300px;margin:auto\")\n .col-md-12\n .into\n p There are over 30,000 NOTAMS out there at any moment in time. Some are \n strong critical\n | , most are not.\n p ICAO and Flight Service Bureau have presented experts from all around the world with a random\n | selection of NOTAMS and asked them to rate them. We have collected over 30000 responses over 2 rounds of collections!\n p We then trained an artificial intelligence algorithm named \"\n strong Norm\n | \" (NOTAM Organizational and Recognition Model) on those human classified NOTAMS. \n | Norm had to identify critical NOTAMS and highlight them.\n p So Norm is here! He kind of gets the criticality. You can see his evaluations of some NOTAMs. \n | You can also provide him with a NOTAM to gets his evaluation.\n p Norm got also trained on assigning Q-codes to NOTAMS. He then uses that Q-code to give hints on the areas the NOTAM \n | covers using ICAO Doc 8400 Abbreviations and Codes (ABC).\n p To get smarter, Norm needs more data. Contact us if you want to contribute to further train Norm.\n p Please note that this project is an experiment and the results are \n strong not intended for operational use \n | at this point!\n hr\n h3: strong Get the data\n p.into Norm has been trained using human classified NOTAMS. A first round of classifications gave us a list of 16654 classified NOTAMS. \n | This dataset was used to train and test our neural network. A second round added another 20000 NOTAMS to the training set. \n p.into If you want to train your own network, feel free to download the data: \n p.into\n a(href=\"https://s3.amazonaws.com/istarsshare/normround1.json\") normround1.json (3.6MB)\n p.into\n a(href=\"https://s3.amazonaws.com/istarsshare/normround2.json\") normround2.json (9.8MB)\n\n p.into You can also call Norm via our \n a(href=\"https://www.icao.int/safety/iStars/Pages/API-Data-Service.aspx\") API Data Service\n | . For a given NOTAM, you can request criticality or decoding. \n | More information on getting NOTAM data is available on our page \n a(href=\"https://www.icao.int/safety/iStars/Pages/Get-NOTAM-Data.aspx\") Get NOTAM Data\n | .\n hr\n h3: strong Chat with Norm\n p.into Copy-paste a NOTAM message into the text box to get Norms opinion about the criticality of this NOTAM\n p.into Select the language you want Norm to speak \n select#lang\n option(value='en') English\n option(value='es') Spanish\n option(value='zh') Chinese\n option(value='ru') Russian\n option(value='fr') French\n option(value='ar') Arabic\n \n #chatzone(style=\"width:600px;margin:auto\")\n \n #chatzonedefault(style=\"display:none\")\n .r1.row(style=\"display:none\")\n .text-center\n span.qdate(style=\"font-size:8px;text-align:center\")=new Date().toISOString()\n .me\n span You\n .mynotam.alert.alert-info(style=\"text-align:left\") ANB IS THERE SOME STUFF TO DO HERE\n .r2.row(style=\"display:none\")\n .norm\n span.normname Norm\n .alert.alert-warning \n //p Let me check that NOTAM\n \n p.typing(style=\"font-size:10px\")\n span.typ.fas.fa-circle.low(value=\"low\")\n span.typ.fas.fa-circle.med(value=\"med\")\n span.typ.fas.fa-circle.high(value=\"high\")\n p.response(style=\"display:none\")\n p.eval(style=\"display:none\",name=\"0\") This NOTAM is garbage.\n p.eval(style=\"display:none\",name=\"1\") This information is of low importance.\n p.eval(style=\"display:none\",name=\"2\") This information of medium importance.\n p.eval(style=\"display:none\",name=\"3\") This information is of high importance.\n p.eval(style=\"display:none\",name=\"4\") This information is crucial.\n \n textarea#asknotam.form-control\n button#ask.btn.btn-success Send\n hr\n .into: p Below are 10 randomly chosen NOTAMs. For each, you will see what Norm thinks about it. \n | You think he does not get it totally yet? Contact us to train him more!\n h3\n strong This NOTAM is critical to flight operations \n | - how much do you agree?\n //#yournotams(style=\"height:200px;width:600px;margin:auto\")\n #questionnaire\n table#maintable.qtable.table-condensed.table(sid=new Date().getTime())\n thead\n tr\n //th(style=\"width:200px\") Location\n th(style=\"width:450px\") NOTAM\n th.text-center(style=\"width:50px;font-size:8px\") Strongly Disagree\n th.text-center(style=\"width:50px;font-size:8px\") Disagree\n th.text-center(style=\"width:50px;font-size:8px\") Neither agree nor disagree\n th.text-center(style=\"width:50px;font-size:8px\") Agree\n th.text-center(style=\"width:50px;font-size:8px\") Strongly Agree\n tbody\n for q in notams\n tr\n //td=(q.locationame?q.locationame+\" (\"+q.location+\")\":q.location)+(q.statename?\", \"+q.statename:\"\")\n td.notam(notam=q.all)\n span(style=\"font-size:10px\")=(q.locationame?q.locationame+\" (\"+q.location+\")\":q.location)+(q.statename?\", \"+q.statename:\"\")\n br\n span.question=q.message\n td.text-center\n if (q.criticality==0)\n span.ff.fas.fa-circle\n else\n span.ff.far.fa-circle\n td.text-center\n if (q.criticality==1)\n span.ff.fas.fa-circle\n else\n span.ff.far.fa-circle\n td.text-center\n if (q.criticality==2)\n span.ff.fas.fa-circle\n else\n span.ff.far.fa-circle\n td.text-center\n if (q.criticality==3)\n span.ff.fas.fa-circle\n else\n span.ff.far.fa-circle\n td.text-center\n if (q.criticality==4)\n span.ff.fas.fa-circle\n else\n span.ff.far.fa-circle\n //#yournotams(style=\"height:200px;width:600px;margin:auto\")\n //.b(style=\"margin:auto;text-align:center;padding-bottom:30px\"): button#done.btn.btn-info.btn-lg(disabled) I am done!\n"},"capture":"https://quipslibistars.s3.amazonaws.com/prod/e2d9b5942bfb1218e7d4bdb277b0cd4c99bc35dd/capture.png","morejs":[{"url":"https://code.highcharts.com/highcharts-more.js"}],"morecss":[{"url":"https://use.fontawesome.com/releases/v5.1.0/css/all.css"}],"prod":true,"sharedwith":["5969034e9b111eaf654f4aab"],"deploydate":"2019-05-28T08:15:03.814Z","libs":[{"_id":"5672b285f36b083214f3e63b","description":"A sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.","key":"","version":"3.3.6","link":"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css,https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css,https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js","name":"bootstrap","__v":0,"haskey":false,"required":false,"website":"http://www.getbootstrap.com"},{"_id":"5672b2dbf36b083214f3e63c","description":"","key":"","version":"4.2.0","link":"https://code.highcharts.com/highcharts.js","name":"highcharts","__v":0,"haskey":false,"required":false,"website":"Highcharts.com"},{"_id":"5672b602f36b083214f3e63e","description":"The Write Less, Do More, JavaScript Library","key":"","version":"2.1.1","link":"https://code.jquery.com/jquery-2.1.4.js","name":"jquery","__v":0,"required":true,"haskey":false,"website":"https://jquery.com"}],"host":"https://quips.anbdata.com","version":"prod"} function loadjquery(url,callback) { if(typeof jQuery=='undefined') { loadScript(url,callback) } else { callback() } } function loadScript(url, callback) { var script = document.createElement("script") script.type = "text/javascript"; if (script.readyState) { //IE script.onreadystatechange = function () { if (script.readyState == "loaded" || script.readyState == "complete") { script.onreadystatechange = null; callback(); } }; } else { //Others script.onload = function () { callback(); }; } script.src = url; document.getElementsByTagName("head")[0].appendChild(script); } (function () { loadjquery("https://code.jquery.com/jquery-2.1.4.js", function () { //jQuery loaded $("#"+project.container).html("") var libs=[] $(project.libs).each(function(i,v){ if (v.name!="jquery") { $(v.link.split(",")).each(function(j,u){ if (u.slice(-2)=="js") { libs.push(u+(v.haskey?"?key="+project[v.name+"key"]:"")) } else { $("head").append("") } }) } }) if (project.morejs) { $(project.morejs).each(function(i,v){ if ((v.url.substring(0,2)=="//")||(v.url.substring(0,8)=="https://")||(v.url.substring(0,7)=="http://")) { libs.push(v.url) } }) } if (project.morecss) { $(project.morecss).each(function(i,v){ $("head").append("") }) } loadlibs(libs.reverse()) }); })(); function loadlibs(libs){ if (libs.length>0) { var l=libs.pop() loadScript(l,function(){ //$.getScript(l,function(res){ loadlibs(libs) }) //.fail(function(e){ // loadlibs(libs) // //}) } else { start() } } function putscriptcontent(content){ var script = document.createElement("script") script.type = "text/javascript"; $(script).text(content) document.getElementsByTagName("head")[0].appendChild(script); } function start(){ //load jade $.getJSON(project.host+"/project/"+project.version+"/"+project.id+"/render?callback=?"+(project.datachange?"&data="+project.datachange:""),function(res){ $("#"+project.container).html(res.html) if (project.css.activated) { if (project.css.linkedtofile) { $("head").append("")} else { $("head").append("")} } if (project.js.activated) { if (project.js.linkedtofile) { $.getScript(project.js.file[(project.prod?"depurl":"url")])} else { putscriptcontent(project.js.content)} if (project.mainjs) { window[project.mainjs]() } } }) }