1111 || navigator . userAgent . match ( / B l a c k B e r r y / i)
1212 ) is_mobile = true ;
1313
14- // embed detection
14+ // wvar detection
1515var vfilter = "" ;
1616var nyan_mode = false ;
1717
18- var embed = {
18+ var wvar = {
1919 enabled : false ,
2020 vlist : true ,
2121 graph : true ,
@@ -31,21 +31,21 @@ for(var idx in params) {
3131 if ( line . length < 2 ) continue ;
3232
3333 switch ( line [ 0 ] ) {
34- case "embed " : if ( line [ 1 ] == "1" ) embed . enabled = true ; break ;
35- case "hidelist" : if ( line [ 1 ] == "1" ) embed . vlist = false ; break ;
36- case "hidegraph" : if ( line [ 1 ] == "1" ) embed . graph = false ; break ;
37- case "expandgraph" : if ( line [ 1 ] == "1" ) embed . graph_expanded = true ; break ;
34+ case "wvar " : if ( line [ 1 ] == "1" ) wvar . enabled = true ; break ;
35+ case "hidelist" : if ( line [ 1 ] == "1" ) wvar . vlist = false ; break ;
36+ case "hidegraph" : if ( line [ 1 ] == "1" ) wvar . graph = false ; break ;
37+ case "expandgraph" : if ( line [ 1 ] == "1" ) wvar . graph_expanded = true ; break ;
3838 case "filter" : vfilter = line [ 1 ] ; break ;
3939 case "nyan" : nyan_mode = true ; break ;
40- case "latestonly" : embed . latestonly = ( parseInt ( line [ 1 ] ) == 1 ) ? true : false ; break ;
41- case "focus" : embed . focus = line [ 1 ] ; break ;
42- case "docid" : embed . docid = line [ 1 ] ; break ;
40+ case "latestonly" : wvar . latestonly = ( parseInt ( line [ 1 ] ) == 1 ) ? true : false ; break ;
41+ case "focus" : wvar . focus = line [ 1 ] ; break ;
42+ case "docid" : wvar . docid = line [ 1 ] ; break ;
4343 }
4444}
4545
46- if ( embed . latestonly ) $ ( "#latestonly" ) . show ( ) ;
46+ if ( wvar . latestonly ) $ ( "#latestonly" ) . show ( ) ;
4747
48- if ( embed . enabled ) {
48+ if ( wvar . enabled ) {
4949 //analytics
5050 if ( typeof _gaq == 'object' ) _gaq . push ( [ '_trackEvent' , 'Functionality' , 'Embed Opts' , window . location . search ] ) ;
5151}
@@ -103,11 +103,11 @@ function trackerInit() {
103103
104104 if ( map ) return ;
105105
106- if ( is_mobile || embed . enabled ) $ ( ".nav .embed " ) . hide ( ) ;
106+ if ( is_mobile || wvar . enabled ) $ ( ".nav .wvar " ) . hide ( ) ;
107107
108108 if ( ! is_mobile ) {
109109 $ . getScript ( "js/init_plot.js" , function ( ) { checkSize ( ) ; if ( ! map ) load ( ) ; } ) ;
110- if ( embed . graph ) $ ( '#telemetry_graph' ) . attr ( 'style' , '' ) ;
110+ if ( wvar . graph ) $ ( '#telemetry_graph' ) . attr ( 'style' , '' ) ;
111111
112112 // fetch hysplit jobs
113113 setInterval ( refresh_hysplit , 60 * 1000 ) ;
@@ -153,7 +153,7 @@ function checkSize() {
153153
154154 $ ( "#mapscreen,.flatpage" ) . height ( h - hh - 5 ) ;
155155
156- sw = ( embed . vlist ) ? 199 : 0 ;
156+ sw = ( wvar . vlist ) ? 199 : 0 ;
157157
158158 $ ( '.container' ) . width ( w - 20 ) ;
159159
@@ -169,7 +169,7 @@ function checkSize() {
169169 $ ( '#main' ) . width ( sw ) ;
170170 } else { // portrait mode
171171 //if(h < 420) h = 420;
172- var mh = ( embed . vlist ) ? 180 : 0 ;
172+ var mh = ( wvar . vlist ) ? 180 : 0 ;
173173
174174 $ ( 'body,#loading' ) . height ( h ) ;
175175 $ ( '#map,#mapscreen' ) . height ( h - hh - 5 - mh ) ;
@@ -399,7 +399,7 @@ $(window).ready(function() {
399399 } ) ;
400400
401401 // expand graph on startup, if nessary
402- if ( embed . graph_expanded ) $ ( '#telemetry_graph .graph_label' ) . click ( ) ;
402+ if ( wvar . graph_expanded ) $ ( '#telemetry_graph .graph_label' ) . click ( ) ;
403403
404404 // hysplit button
405405 $ ( "#main" ) . on ( 'click' , '.row .data .hysplit' , function ( event ) {
@@ -684,7 +684,7 @@ $(window).ready(function() {
684684 if ( navigator . geolocation ) {
685685 // if we have geolocation services, show the locate me button
686686 // the button pants the map to the user current location
687- if ( is_mobile && ! embed . enabled ) $ ( ".chasecar" ) . show ( ) ;
687+ if ( is_mobile && ! wvar . enabled ) $ ( ".chasecar" ) . show ( ) ;
688688 $ ( "#locate-me,#app_name" ) . attr ( 'style' , '' ) . click ( function ( ) {
689689 if ( map && currentPosition ) {
690690 // disable following of vehicles
0 commit comments