This file is indexed.

/usr/share/gnome-shell/extensions/ubuntu-dock@ubuntu.com/extension.js is in gnome-shell-extension-ubuntu-dock 0.9.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
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-

const Me = imports.misc.extensionUtils.getCurrentExtension();
const Docking = Me.imports.docking;
const Convenience = Me.imports.convenience;
const ExtensionSystem = imports.ui.extensionSystem;

// We declare this with var so it can be accessed by other extensions in
// GNOME Shell 3.26+ (mozjs52+).
var dockManager;


let _extensionlistenerId;

function init() {
    Convenience.initTranslations('dashtodock');
}

function enable() {
    /*
     * Listen to enabled extension, if Dash to Dock is on the list or become active,
     * we disable this dock.
     */
    dockManager=null; // even if declared, we need to initialize it to not trigger a referenceError.
    _extensionlistenerId = ExtensionSystem.connect('extension-state-changed',
                                                   conditionallyenabledock);
    conditionallyenabledock();
}

function disable() {
    dockManager.destroy();

    dockManager=null;

    if (_extensionlistenerId) {
        ExtensionSystem.disconnect(_extensionlistenerId);
        _extensionlistenerId = 0;
    }
}

function conditionallyenabledock() {
    let to_enable = true;
    let runningExtensions = ExtensionSystem.extensionOrder;
    for (let i = 0; i < runningExtensions.length; i++) {
        if (runningExtensions[i] === "dash-to-dock@micxgx.gmail.com") {
            to_enable = false;
        }
    }

    // enable or disable dock depending on dock status and to_enable state
    if (to_enable && !dockManager) {
        dockManager = new Docking.DockManager();
    } else if (!to_enable && dockManager) {
        dockManager.destroy();
        dockManager = null;
    }
}