This file is indexed.

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

require([
    'jquery',
    'contents',
    'base/js/namespace',
    'base/js/utils',
    'base/js/page',
    'base/js/events',
    'services/config',
    'edit/js/editor',
    'edit/js/menubar',
    'edit/js/savewidget',
    'edit/js/notificationarea',
    'bidi/bidi',
], function(
    $,
    contents_service,
    IPython,
    utils,
    page,
    events,
    configmod,
    editmod,
    menubar,
    savewidget,
    notificationarea,
    bidi
    ){
    "use strict";

    try {
        requirejs(['custom/custom'], function() {});
        bidi.loadLocale();
    } catch(err) {
        console.log("Error loading custom.js from edition service. Continuing and logging");
        console.warn(err);
    }
    
    page = new page.Page('div#header', 'div#site');

    var base_url = utils.get_body_data('baseUrl');
    var file_path = utils.get_body_data('filePath');
    var config = new configmod.ConfigSection('edit', {base_url: base_url});
    config.load();
    var common_config = new configmod.ConfigSection('common', {base_url: base_url});
    common_config.load();
    var contents = new contents_service.Contents({
        base_url: base_url,
        common_config: common_config
    });
    
    var editor = new editmod.Editor('#texteditor-container', {
        base_url: base_url,
        events: events,
        contents: contents,
        file_path: file_path,
        config: config,
    });
    
    // Make it available for debugging
    IPython.editor = editor;
    
    var save_widget = new savewidget.SaveWidget('span#save_widget', {
        editor: editor,
        events: events,
    });
    
    var menus = new menubar.MenuBar('#menubar', {
        base_url: base_url,
        editor: editor,
        events: events,
        save_widget: save_widget,
    });
    
    var notification_area = new notificationarea.EditorNotificationArea(
        '#notification_area', {
        events: events,
    });
    editor.notification_area = notification_area;
    notification_area.init_notification_widgets();

    utils.load_extensions_from_config(config);
    utils.load_extensions_from_config(common_config);
    editor.load();
    page.show();

    window.onbeforeunload = function () {
        if (editor.save_enabled && !editor.codemirror.isClean(editor.generation)) {
            return "Unsaved changes will be lost. Close anyway?";
        }
    };

    // Make sure the codemirror editor is sized appropriatley.
    var _handle_resize = function() {
        var backdrop = $("#texteditor-backdrop");

        // account for padding on the backdrop wrapper
        var padding = backdrop.outerHeight(true) - backdrop.height();
        $('div.CodeMirror').height($("#site").height() - padding);
    };
    $(window).resize(_handle_resize);

    // On document ready, resize codemirror.
    $(document).ready(_handle_resize);
});