This file is indexed.

/usr/share/stacks/php/stacks.js is in stacks-web 1.35-1ubuntu1.

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
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
//
// Copyright 2010, Julian Catchen <jcatchen@uoregon.edu>
//
// This file is part of Stacks.
//
// Stacks is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Stacks is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Stacks.  If not, see <http://www.gnu.org/licenses/>.
//

function toggle_div(id, root_path, page_state_form) {
    var tr_obj = document.getElementById(id); 
    var caret  = document.getElementById(id + "_img");

    if (tr_obj.style.display == "none") {
	tr_obj.style.display = "";
	caret.src            = root_path + "/caret-d.png"; 

	update_page_state(page_state_form, id, 1);
    }
    else {
	tr_obj.style.display = "none";
	caret.src            = root_path + "/caret-u.png";

	update_page_state(page_state_form, id, 0);
    }
}

function toggle_aln_tr(id, root_path, url) {
    var tr_obj = document.getElementById(id); 
    var caret  = document.getElementById(id + "_img");

    if (tr_obj.style.display == "none") {
	tr_obj.style.display = "";
	caret.src            = root_path + "/caret-d.png"; 

	// Check if the alignment has been loaded, if not, load
        // it in the iframe.
        var iframe_obj = document.getElementById(id + '_iframe');
	iframe_obj.src = url;
    }
    else {
	tr_obj.style.display = "none";
	caret.src            = root_path + "/caret-u.png"; 
    }
}

function toggle_sel(id) {
    var div_obj = document.getElementById(id); 

    if (div_obj.style.display == "none") {
        div_obj.style.display = "";
    }
    else {
        div_obj.style.display = "none";
    }
}

function set_operation(id, operation) {

    if (operation == "reset") {
        var verify = confirm("Are you sure you want to delete all corrections for this marker?");
        if (!verify) return;
    }

    var form_obj = document.getElementById(id); 
    form_obj.op.value = operation;

    form_obj.submit();
}

function toggle_cb(form_id, value) {
    var form_obj = document.getElementById(form_id); 

    for(i = 0; i < form_obj.elements.length; i++)
        if (form_obj.elements[i].value == value) 
            if (form_obj.elements[i].checked == true)
                form_obj.elements[i].checked = false;
            else
                form_obj.elements[i].checked = true;
}

function toggle_genotypes(catalog_id, table_id, type) {
    var table_obj = document.getElementById(table_id); 

    divs = table_obj.getElementsByTagName("div");

    for(i = 0; i < divs.length; i++) {
        if (divs[i].id.substr(0, 3) == type) { 
            if (divs[i].style.display == "none")
                divs[i].style.display = "";
            else
                divs[i].style.display = "none";
	}
    }

    //
    // Adjust the height of the parent iframe to possibly accomodate more data
    //
    var iframe_obj = parent.document.getElementById(catalog_id + "_iframe");
    if (iframe_obj)
	iframe_obj.style.height = (this.document.body.offsetHeight+25) + 'px';
}

function toggle_sumstats(span_obj, col) {
    var snp_index = document.getElementById("snp_index");

    var old_snp = snp_index.value;
    var old_snp_id = old_snp + "_snp";
    var old_span_obj = document.getElementById(old_snp_id); 

    snp_index.value = col;

    if (col == old_snp) return;

    span_obj.className = "snp_sel";
    old_span_obj.className = "snp";

    var div;
    var div_id;

    div_id = old_snp + "_sumstats";
    div    = document.getElementById(div_id); 
    div.style.display = "none";

    div_id = old_snp + "_fst";
    div    = document.getElementById(div_id); 
    div.style.display = "none";

    div_id = col + "_sumstats";
    div    = document.getElementById(div_id); 
    div.style.display = "";

    div_id = col + "_fst";
    div    = document.getElementById(div_id); 
    div.style.display = "";
}