forked from jirkavrba/remove-alt-tab-delay
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathextension.js
More file actions
23 lines (21 loc) · 761 Bytes
/
extension.js
File metadata and controls
23 lines (21 loc) · 761 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { InjectionManager } from 'resource:///org/gnome/shell/extensions/extension.js';
import * as SwitcherPopup from 'resource:///org/gnome/shell/ui/switcherPopup.js';
export default class RemoveAltTabDelayExtension {
enable() {
this._injectionManager = new InjectionManager();
this._injectionManager.overrideMethod(
SwitcherPopup.SwitcherPopup.prototype,
'show',
originalMethod => {
return function (...args) {
if (!originalMethod.apply(this, args)) return false;
this._showImmediately();
return true;
};
}
);
}
disable() {
this._injectionManager.clear();
}
}