summaryrefslogtreecommitdiffstats
path: root/extensions/disable-workspace-switcher/disable-workspace-switcher@jbradaric.me/extension.js
blob: e805c3b2093a641c496d0c8d97d37ea64e5ee6d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
'use strict'

const WorkspaceSwitcherPopup = imports.ui.workspaceSwitcherPopup.WorkspaceSwitcherPopup;

class Extension {
    constructor() {
        this.originalWorkspaceSwitcherPopup_display = WorkspaceSwitcherPopup.prototype.display;
    }

    enable() {
        WorkspaceSwitcherPopup.prototype.display = () => {};
    }

    disable() {
        WorkspaceSwitcherPopup.prototype.display = this.originalWorkspaceSwitcherPopup_display;
    }
}

function init() {
    return new Extension();
}