-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.js
More file actions
44 lines (35 loc) · 885 Bytes
/
bootstrap.js
File metadata and controls
44 lines (35 loc) · 885 Bytes
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 ZotPDF2md;
function log(message) {
Zotero.debug("ZotPDF2md: " + message);
}
function install() {
log("Installed");
}
async function startup({ id, version, rootURI }) {
log("Starting");
Zotero.PreferencePanes.register({
pluginID: "zotpdf2md@zotero.org",
src: rootURI + "preferences.xhtml",
scripts: [rootURI + "preferences.js"]
});
Services.scriptloader.loadSubScript(rootURI + "content/pdf2markdown.js");
ZotPDF2md.init({ id, version, rootURI });
ZotPDF2md.addToAllWindows();
}
function onMainWindowLoad({ window }) {
ZotPDF2md.addToWindow(window);
}
function onMainWindowUnload({ window }) {
ZotPDF2md.removeFromWindow(window);
}
function shutdown() {
log("Shutting down");
if (ZotPDF2md) {
ZotPDF2md.removeFromAllWindows();
ZotPDF2md.shutdown();
ZotPDF2md = undefined;
}
}
function uninstall() {
log("Uninstalled");
}