-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathextension.js
31 lines (26 loc) · 1001 Bytes
/
extension.js
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
const Main = imports.ui.main;
const Me = imports.misc.extensionUtils.getCurrentExtension();
const PasswordManagerSearchProvider = Me.imports.passwordManagerSearchProvider;
let passwordManagerSearchProvider = null;
function init(extensionMeta) {}
function enable() {
if (!passwordManagerSearchProvider) {
passwordManagerSearchProvider = new PasswordManagerSearchProvider.PasswordManagerSearchProvider();
if (passwordManagerSearchProvider.enabled) {
Main.overview.viewSelector._searchResults._registerProvider(
passwordManagerSearchProvider,
);
}
}
}
function disable() {
if (passwordManagerSearchProvider) {
if (passwordManagerSearchProvider.enabled) {
Main.overview.viewSelector._searchResults._unregisterProvider(
passwordManagerSearchProvider,
);
passwordManagerSearchProvider.enabled = false;
}
passwordManagerSearchProvider = null;
}
}