This file is indexed.

/usr/share/pyshared/IPython/frontend/html/notebook/static/js/printwidget.js is in ipython-notebook 0.12.1+dfsg-0ubuntu1.

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
var IPython = (function (IPython) {

    var PrintWidget = function (selector) {
        this.selector = selector;
        if (this.selector !== undefined) {
            this.element = $(selector);
            this.style();
            this.bind_events();
        }
    };

    PrintWidget.prototype.style = function () {
        this.element.find('button#print_notebook').button();
        this.element.find('button#print_notebook').attr('title',
            "Open a new window with printer-friendly HTML of the Notebook." +
            " Note that this is incomplete, and may not produce perfect" +
            " printed output." +
            " Make sure to save before printing, to ensure the output is up to date."
            );
    };

    PrintWidget.prototype.bind_events = function () {
        var that = this;
        this.element.find('button#print_notebook').click(function () {
            that.print_notebook();
        });
    };

    PrintWidget.prototype.enable = function () {
        this.element.find('button#print_notebook').button('enable');
    };

    PrintWidget.prototype.disable = function () {
        this.element.find('button#print_notebook').button('disable');
    };

    PrintWidget.prototype.print_notebook = function () {
        var w = window.open('', '_blank', 'scrollbars=1,menubar=1');
        var html = '<html><head>' +
                   $('head').clone().html() +
                   '<style type="text/css">' +
                   '@media print { body { overflow: visible !important; } }' +
                   '.ui-widget-content { border: 0px; }' +
                   '</style>' +
                   '</head><body style="overflow: auto;">' +
                   $('#notebook').clone().html() +
                   '</body></html>';

        w.document.open();
        w.document.write(html);
        w.document.close();

        return false;
    };

    IPython.PrintWidget = PrintWidget;
    
    return IPython;

}(IPython));