-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathbootstrap.js
44 lines (35 loc) · 1021 Bytes
/
bootstrap.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
32
33
34
35
36
37
38
39
40
41
42
43
44
var PDFBackground;
function log(msg) {
Zotero.debug("zotero-pdf-bakcground: " + msg);
}
function install() {
log("plugin Installed");
}
async function startup({ id, version, rootURI }) {
log("plugin start up");
Zotero.PreferencePanes.register({
pluginID: '[email protected]',
src: rootURI + 'preferences/preferences.xhtml',
// scripts: [rootURI + 'preferences/preferences.js'],
stylesheets: [rootURI + "preferences/preferences.css"],
image: rootURI +'imgs/icon.png'
});
Services.scriptloader.loadSubScript(rootURI + 'zotero-pdf-bakcground.js');
PDFBackground.init({ id, version, rootURI });
await PDFBackground.main();
}
function onMainWindowLoad({ window }) {
log("Zotero main window load")
}
function onMainWindowUnload({ window }) {
log("Zotero main window unload")
}
function shutdown() {
log("plugin Shutting down");
PDFBackground?.removeAllStyle();
PDFBackground = undefined;
}
function uninstall() {
log("plugin Uninstalled");
PDFBackground?.removeAllStyle();
}