Files
Florian Müllner a911447375 js: Port to ESM
The shell pulled the trigger and switched to ESM for all its
imports, follow suit.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/269>
2023-08-06 15:59:35 +02:00

23 lines
655 B
JavaScript

import {AppIcon} from 'resource:///org/gnome/shell/ui/appDisplay.js';
import {InjectionManager} from 'resource:///org/gnome/shell/extensions/extension.js';
export default class Extension {
constructor() {
this._injectionManager = new InjectionManager();
}
enable() {
this._injectionManager.overrideMethod(AppIcon.prototype, 'activate',
originalMethod => {
return function () {
// eslint-disable-next-line no-invalid-this
originalMethod.call(this, 2);
};
});
}
disable() {
this._injectionManager.clear();
}
}