This file is indexed.

/usr/share/games/flightgear/Phi/topics/Environment/Weather/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
60
61
62
63
64
65
66
67
68
define([
        'jquery', 'knockout', 'text!./METAR.html', 'jquery-ui/accordion', 'kojqui/button'
], function(jquery, ko, htmlString) {

    function WeatherScenarioVM() {
        var self = this;

        self.index = 0;
        self.name = "unnamed";
        self.metar = ko.observable("NIL");
        self.description = "NIL";

    }

    var WeatherScenarioMapping = {
        "index" : "index",
        "description" : "description",
        "name" : "name",
        "metar" : "metar"
    }

    function ViewModel(params) {
        var self = this;

        self.scenarios = ko.observableArray([]);
        self.selectScenario = function(foo) {
            console.log(foo);
        }

        jquery.get('/json/environment/weather-scenarios?d=2', null, function(data) {

            var assemble = function(data) {
                var scenarios = [];
                data.children.forEach(function(prop) {
                    if (prop.name === 'scenario') {
                        var scenario = new WeatherScenarioVM();
                        scenarios.push(ko.utils.knockprops.propsToObject(prop, WeatherScenarioMapping, scenario));
                        
                        // listen to the metar property for the live data scenario
                        if (scenario.name == "Live data") {
                            scenario.metar = ko.observable().extend({
                                fgprop : 'metar'
                            });
                        }
                    }
                });
                return scenarios;
            }

            self.scenarios(assemble(data));
            jquery("#weather-scenarios").accordion({
                collapsible : true,
                heightStyle : "content",
                active : false,
            });
        });

    }

    // ViewModel.prototype.dispose = function() {
    // }

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