Skip to content

Commit 6bac562

Browse files
Mark JessopMark Jessop
authored andcommitted
nena mode
1 parent a495f24 commit 6bac562

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

js/app.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ function lhash_update(history_step) {
4040
hash += "&nyan=1";
4141
}
4242

43+
if(wvar.nena) {
44+
hash += "&nena=1";
45+
}
46+
4347
hash = encodeURI(hash);
4448
// set state
4549
if(history_supported) {
@@ -64,6 +68,7 @@ var wvar = {
6468
zoom: true,
6569
query: "",
6670
nyan: false,
71+
nena: false,
6772
site: 0,
6873
};
6974

@@ -87,6 +92,7 @@ function load_hash(no_refresh) {
8792
focus: "",
8893
query: "",
8994
nyan: false,
95+
nena: false,
9096
};
9197

9298
parms.forEach(function(v) {
@@ -128,6 +134,9 @@ function load_hash(no_refresh) {
128134
case "nyan":
129135
def[k] = !!parseInt(v);
130136
break;
137+
case "nena":
138+
def[k] = !!parseInt(v);
139+
break;
131140
case "site":
132141
focusID = v;
133142
gotoSite(v);
@@ -136,7 +145,7 @@ function load_hash(no_refresh) {
136145
});
137146

138147
// check if we should force refresh
139-
['mode','query','nyan'].forEach(function(k) {
148+
['mode','query','nyan','nena'].forEach(function(k) {
140149
if(wvar[k] != def[k]) refresh = true;
141150
});
142151

@@ -180,6 +189,7 @@ for(var idx in params) {
180189
$("header .search input[type='text']").val(wvar.query);
181190
break;
182191
case "nyan": wvar.nyan = true; break;
192+
case "nena": wvar.nena = true; break;
183193
case "focus": wvar.focus = decodeURIComponent(line[1]); break;
184194
case "docid": wvar.docid = line[1]; break;
185195
case "mode": wvar.mode = decodeURIComponent(line[1]); break;

js/tracker.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3079,6 +3079,11 @@ function addPosition(position) {
30793079
vehicle_type = "balloon";
30803080
color_index = balloon_index++ % balloon_colors.length;
30813081

3082+
if(wvar.nena){
3083+
// All the balloon are red.
3084+
color_index = 0;
3085+
}
3086+
30823087
image_src = host_url + markers_url + "balloon-" +
30833088
((vcallsign == "PIE") ? "rpi" : balloon_colors_name[color_index]) + ".png";
30843089
image_src_size = [46,84];

0 commit comments

Comments
 (0)