This file is indexed.

/usr/lib/python2.7/dist-packages/notebook/static/notebook/js/celltoolbarpresets/attachments.js is in python-notebook 5.2.2-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
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.

define([
    'notebook/js/celltoolbar',
    'base/js/dialog',
    'base/js/i18n'
], function(celltoolbar, dialog, i18n) {
    "use strict";

    var CellToolbar = celltoolbar.CellToolbar;

    var edit_attachments_dialog = function(cell) {
        dialog.edit_attachments({
          attachments: cell.attachments,
          callback: function(attachments) {
            cell.attachments = attachments;
            // Force cell refresh
            cell.unrender();
            cell.render();
          },
          name: 'Cell',
          notebook: cell.notebook,
          keyboard_manager: cell.keyboard_manager
        });
    };

    var add_dialog_button = function(div, cell) {
        var button_container = $(div);
        var button = $('<button />')
            .addClass('btn btn-default btn-xs')
            .text(i18n.msg._('Edit Attachments'))
            .click( function() {
              edit_attachments_dialog(cell);
              return false;
            });
        button_container.append(button);
    };

    var register = function(notebook) {
      CellToolbar.register_callback('attachments.edit', add_dialog_button);

      var attachments_preset = [];
      attachments_preset.push('attachments.edit');

      CellToolbar.register_preset(i18n.msg._('Attachments'), attachments_preset, notebook);

    };
    return {'register' : register};
});