Difference between revisions of "Widget:Ctarailtimes"
m |
m |
||
Line 7: | Line 7: | ||
var wait<!--{$stopid}--> = setTimeout(function(){ | var wait<!--{$stopid}--> = setTimeout(function(){ | ||
livetime<!--{$stopid}-->(); | livetime<!--{$stopid}-->(); | ||
− | var refresh<!--{$stopid}--> = setInterval(livetime<!--{$stopid}-->, | + | var refresh<!--{$stopid}--> = setInterval(livetime<!--{$stopid}-->,60000); |
},<!--{if isset($wait)}-->1000<!--{else}-->0<!--{/if}-->); | },<!--{if isset($wait)}-->1000<!--{else}-->0<!--{/if}-->); | ||
}); | }); | ||
Line 43: | Line 43: | ||
for (var h = 0; h < linesunique.length; h++) { | for (var h = 0; h < linesunique.length; h++) { | ||
times = data3.filter(obj => obj.rt == linesunique[h]); | times = data3.filter(obj => obj.rt == linesunique[h]); | ||
− | alltimes += "<div style='font-weight: bold;'>" + | + | let newlinename = linesunique[h] |
+ | .replace("G","Green Line") | ||
+ | .replace("Org","Orange Line") | ||
+ | .replace("Pink","Pink Line") | ||
+ | .replace("P","Purple Line") | ||
+ | .replace("Red","Red Line") | ||
+ | .replace("Y","Yellow Line") | ||
+ | .replace("Brn","Brown Line") | ||
+ | .replace("Blue","Blue Line"); | ||
+ | alltimes += "<div style='font-weight: bold;'>" + newlinename + "</div> "; | ||
var destin = []; | var destin = []; | ||