This file is indexed.

/usr/share/games/flightgear/Phi/widgets/metar.js is in flightgear-phi 2016.4.2+dfsg1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
define([
        'knockout', 'text!./metar.html', 'fgcommand', 'kojqui/tooltip'
], function(ko, htmlString, fgCommand ) {

    function ViewModel(params) {
      var NO_METAR = "*** no METAR ";
      self.scrolledMetar = ko.observable("");
      self.textStart = 0;
      self.metar = ko.observable(NO_METAR);
      self.valid = ko.observable(false).extend({ fgprop: 'metar-valid' });
      self.valid.subscribe(function(newValue) {
        self.textStart = 0;
        if( false == newValue ) {
          self.metar(NO_METAR);
          return;
        }
        self.metar("Wait.. ");
        fgCommand.getPropertyValue('/environment/metar/data', function(value) {
          self.textStart = 0;
          // start with station id (4 upcase chars), skip leading garbage
          var idx = value.search("[A-Z]{4}");
          if( idx >= 0 ) value = value.substring(idx);
          self.metar(value);
        });
      });

      self.textLength = 20;
      self.timerId = 0;
      self.longTimeout = 1500;
      self.shortTimeout = 50;

      function scrollText ( id ){
          if( id != self.timerId )
              return;

          var t = self.metar() + " " + self.metar();
          var a = self.textStart;
          var b = a+self.textLength;
          self.scrolledMetar( t.substring(a,b) );
          var timeout = t.charAt(a) == ' ' ? self.longTimeout : self.shortTimeout;
          if( ++a  >= self.metar().length )
            a = 0;
          self.textStart = a;
          setTimeout(function() { scrollText(id); }, timeout );
      }

      scrollText( ++self.timerId );
    }

    ViewModel.prototype.dispose = function() {
      self.timerId++;
    }

    // Return component definition
    return {
        viewModel : ViewModel,
        template : htmlString
    };
});