summaryrefslogtreecommitdiffstats
path: root/extensions/46/disable-workspace-switcher/disable-workspace-switcher@jbradaric.me/extension.js
blob: a814f54c2ad06c555916467482572665c913a1e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { Extension } from 'resource:///org/gnome/shell/extensions/extension.js';
import { WorkspaceSwitcherPopup } from 'resource:///org/gnome/shell/ui/workspaceSwitcherPopup.js';

export default class extends Extension {
    enable() {
        this._originalWorkspaceSwitcherPopup_display = WorkspaceSwitcherPopup.prototype.display;
        WorkspaceSwitcherPopup.prototype.display = () => {};
    }

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