Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
165 commits
Select commit Hold shift + click to select a range
e4f1997
Add jsconfig.json for TSServer completions
wshanks Aug 27, 2019
1a38a6e
Update changelog
wshanks Aug 27, 2019
a0f7118
Document new collection links commands
wshanks Aug 27, 2019
b3d409c
Remove documentation related to Zotero Firefox addon
wshanks Aug 27, 2019
4d0e397
Remove content related to addons.mozilla.org
wshanks Aug 27, 2019
9db692f
Mirror top-level English docs to internal copies
wshanks Aug 27, 2019
73b427b
Fix remaining eslint errors in bootstrap.js
wshanks Aug 27, 2019
651344e
Fix eslint warnings in zutilo.jsm
wshanks Aug 27, 2019
3926054
Rename zutilo.jsm to zutilo.js
wshanks Aug 27, 2019
88be785
Fix null key error
wshanks Aug 27, 2019
a399de9
Add more collection function documentation
wshanks Aug 27, 2019
11e1026
Remove support for Firefox
wshanks Aug 27, 2019
dbb8a75
Drop support for Zotero 4.x
wshanks Aug 27, 2019
829b34f
Update changelog
wshanks Aug 27, 2019
d069583
Add shortcuts for item field copy/paste functions
wshanks Aug 27, 2019
1a72b23
Add shortcuts for collection link commands
wshanks Aug 27, 2019
f3040be
Update version string in node metadata files
wshanks Aug 27, 2019
0808e85
Drop Firefox from update.rdf
wshanks Aug 27, 2019
c355fe5
Version 3.2.0
wshanks Aug 27, 2019
c099b7e
Bump version to beta 3.2.1a1
wshanks Aug 27, 2019
810f2db
Update changelog
wshanks Sep 7, 2019
4e88964
Include css file needed for Zotero 5.0.75
wshanks Sep 7, 2019
31183ea
Version 3.2.1
wshanks Sep 7, 2019
277a6a5
Bump version to beta 3.2.2a1
wshanks Sep 7, 2019
c00de67
add ZotFile move and rename file shortcut
vancleve Oct 3, 2019
59a7a02
Merge pull request #112 from vancleve/zotfile-rename
willsALMANJ Oct 5, 2019
b010237
Update documentation: ZotFile commands
willsALMANJ Oct 5, 2019
74be6a2
Version 3.3.0
willsALMANJ Oct 5, 2019
aab98cd
Bump version to beta 3.3.1a1
willsALMANJ Oct 5, 2019
df9a2fa
Warn about downloading xpi with Firefox
wshanks Nov 4, 2019
6242643
Fix add tag shortcut for Zotero 5.0.78
wshanks Dec 6, 2019
a9954bb
Change GitHub content type to zoteroplugin
wshanks Dec 6, 2019
ff3a484
Update changelog
wshanks Dec 6, 2019
6c68a46
Version 3.3.1
wshanks Dec 6, 2019
1fd9028
Bump version to beta 3.3.2a1
wshanks Dec 6, 2019
30f347d
Another caveat about downloading the xpi with Firefox
wshanks Dec 6, 2019
0ffccc2
Fix modify attachment mishandling non-matching paths
wshanks Dec 6, 2019
f0fcef6
Version 3.3.2
wshanks Dec 6, 2019
55d7a44
Bump version to beta 3.3.3a1
wshanks Dec 6, 2019
66eb0d7
Filter attachments by mode when modifying paths
wshanks Dec 6, 2019
5db36a6
Version 3.3.3
wshanks Dec 6, 2019
936ea05
Bump version to beta 3.3.4a1
wshanks Dec 6, 2019
79c3719
Add shortcut for BBT's push to TeXstudio
wshanks Jan 18, 2020
f1ba26d
Merge pull request #120 from willsALMANJ/bbt-texstudio
willsALMANJ Feb 1, 2020
db44c14
Add "Advanced search" shortcut
qqobb Feb 9, 2020
be8f1e4
Add "Locate with Google Scholar" shortcut
wshanks Feb 10, 2020
7d90028
Add "Locate menu" shortcut
qqobb Feb 10, 2020
f285b3a
Clarify locate menu string
wshanks Feb 14, 2020
ffc3c16
Make locate item shortcut configurable
wshanks Feb 14, 2020
7da521e
Add tag selector shortcuts
wshanks Feb 14, 2020
231c40b
Version 3.4.0
willsALMANJ Feb 29, 2020
dd773e6
Bump version to beta 3.4.1a1
willsALMANJ Feb 29, 2020
315bcf3
Bump acorn from 7.0.0 to 7.1.1
dependabot[bot] Mar 14, 2020
5732a1d
Merge pull request #132 from willsALMANJ/dependabot/npm_and_yarn/acor…
willsALMANJ Mar 14, 2020
ff1d60d
Update zutilo.properties
fflamerie Apr 2, 2020
b87fde2
Update zutilo.dtd
fflamerie Apr 2, 2020
b9bbb08
Merge pull request #133 from fflamerie/patch-1
willsALMANJ Apr 3, 2020
a420042
Merge pull request #134 from fflamerie/patch-2
willsALMANJ Apr 3, 2020
ad1802f
Add more QuickCopy alt. settings
zaeph Apr 11, 2020
4c40c8e
Merge pull request #135 from Zaeph/more-alt-quick-copy-settings
willsALMANJ Apr 12, 2020
c25f043
Fix "Retrieve metadata for PDF" shortcut
willsALMANJ Apr 24, 2020
d692e26
Make item menu prefpane scrollable
wshanks May 28, 2020
640d751
Merge pull request #145 from willsALMANJ/pref-scroll
willsALMANJ May 28, 2020
75fdcd5
Removve reference to Firefox-only features
willsALMANJ May 29, 2020
82455e1
Rework alt quick copy handling
willsALMANJ May 29, 2020
90e8423
Merge pull request #146 from willsALMANJ/quickcopyalts
willsALMANJ May 29, 2020
b1aadd1
Add "Open Zotero URI" function
willsALMANJ Jul 3, 2020
df0a514
Merge pull request #150 from willsALMANJ/issue-149
willsALMANJ Jul 3, 2020
906a28f
Update changelog
willsALMANJ Jul 3, 2020
aff7d42
Version 3.5.0
willsALMANJ Jul 3, 2020
9cfc0a5
Bump version to beta 3.5.1a1
willsALMANJ Jul 3, 2020
ef24547
Update changelog
willsALMANJ Jul 3, 2020
00092c9
Bump lodash from 4.17.15 to 4.17.19
dependabot[bot] Jul 18, 2020
d2d5f70
Merge pull request #151 from willsALMANJ/dependabot/npm_and_yarn/loda…
willsALMANJ Jul 19, 2020
437e8c0
Update zutilo.properties
fflamerie Nov 16, 2020
5723ec5
fixed 2 typos
fflamerie Nov 16, 2020
4f2be98
Update COMMANDS.md
fflamerie Nov 16, 2020
0481b62
Merge pull request #159 from fflamerie/patch-3
wshanks Nov 17, 2020
406d9d2
Merge pull request #161 from fflamerie/patch-5
wshanks Nov 17, 2020
242cded
Merge pull request #160 from fflamerie/patch-4
wshanks Nov 17, 2020
6468131
Update zutilo.properties
fflamerie Nov 19, 2020
5f655ab
Merge pull request #163 from fflamerie/patch-6
wshanks Nov 19, 2020
88cf5ac
Propagate recent docs changes to locales
wshanks Dec 1, 2020
ee45fc5
Merge pull request #168 from wshanks/fix-locales
wshanks Dec 1, 2020
08e3765
Translate USAGE.md to French
fflamerie Nov 20, 2020
c2625b5
Merge pull request #164 from fflamerie/patch-7
wshanks Dec 1, 2020
1e0e366
Translate COMMANDS.md to French
fflamerie Nov 20, 2020
8366e7f
Merge pull request #165 from fflamerie/patch-8
wshanks Dec 1, 2020
d3cab75
Update documentation for paste all item fields
qqobb Nov 23, 2020
e7cfd79
Propagate docs change to locales
wshanks Dec 1, 2020
b605fd5
Clarify why itemType is needed for paste JSON
wshanks Dec 1, 2020
97e28d6
Merge pull request #167 from qqobb/PasteAllDocs
wshanks Dec 1, 2020
0983236
Add batch editing of item types
qqobb Nov 22, 2020
6a0d56d
Propagate string changes to locales
wshanks Dec 1, 2020
3da2326
Merge pull request #166 from qqobb/itemTypeEditing
wshanks Dec 1, 2020
b5e4944
Update changelog
wshanks Dec 1, 2020
0d2f4c0
Update GitHub addresses
wshanks Dec 1, 2020
3377e26
Version 3.6.0
wshanks Dec 1, 2020
0d60ed6
Bump version to beta 3.6.1a1
wshanks Dec 1, 2020
a0ac820
translated "Paste item type"
fflamerie Dec 2, 2020
da8a986
update translation l. 106 - 120 + typo
fflamerie Dec 2, 2020
26756e6
Merge pull request #169 from fflamerie/patch-9
wshanks Dec 2, 2020
9893b3f
Merge pull request #170 from fflamerie/patch-10
wshanks Dec 2, 2020
95ab3d7
Version 3.6.1
wshanks Dec 2, 2020
7d7fa0b
Bump version to beta 3.6.2a1
wshanks Dec 2, 2020
85b0db3
Update changelog for 3.6.1
wshanks Dec 2, 2020
4c5400a
add ZotFile extract annotations shortcut (#174)
harshita-gupta Jan 26, 2021
8fbaa68
Remove old documentation about Firefox feature
wshanks Jan 26, 2021
19c8f37
Merge pull request #175 from wshanks/docs-remove-firefox
wshanks Jan 26, 2021
15d6e82
Add extract annotations to documentation
wshanks Jan 26, 2021
3c1bc44
Merge pull request #176 from wshanks/docs-extract-annotations
wshanks Jan 26, 2021
91415b1
Version 3.7.0
wshanks Jan 26, 2021
c76d5f5
Bump version to beta 3.7.1a1
wshanks Jan 26, 2021
e75a2a4
Added Find Available PDF shortcut
masteranza Jan 27, 2021
9fb4664
Merge pull request #178 from masteranza/master
wshanks Jan 28, 2021
8a5042f
Version 3.8.0
wshanks Jan 28, 2021
d4aa413
Bump version to beta 3.8.1a1
wshanks Jan 28, 2021
d6855e0
updated translation : findPDF + ExtractAnnotations
fflamerie Feb 4, 2021
f0d13f7
translation updated FindPDF + ExtractAnnotations
fflamerie Feb 4, 2021
ef204c5
Fix ZotFile pdf annotation shortcut
wshanks Feb 18, 2021
08a6808
Merge pull request #184 from wshanks/issue-183
wshanks Feb 18, 2021
d8c3d90
Fix show file shortcut when attachments selected
wshanks Feb 18, 2021
6df5503
Merge pull request #185 from wshanks/fix-show-file
wshanks Feb 18, 2021
c04e6fe
Merge pull request #179 from fflamerie/patch-11
wshanks Feb 18, 2021
dd27c9b
Merge pull request #180 from fflamerie/patch-12
wshanks Feb 18, 2021
7ca143e
Update changelog
wshanks Feb 18, 2021
0547dc0
Version 3.8.1
wshanks Feb 18, 2021
0e94888
Bump version to beta 3.8.2a1
wshanks Feb 18, 2021
0e7aaef
Update USAGE.md
Feb 25, 2021
52b37cd
Merge pull request #186 from ilakast/patch-1
wshanks Mar 5, 2021
afa722b
Fix broken Style Editor shortcut
qqobb Mar 15, 2021
0a6c999
Add Open Run JavaScript window shortcut
qqobb Mar 15, 2021
df721e1
Merge pull request #188 from qqobb/StyleEditor
wshanks Mar 15, 2021
ce9c007
Merge pull request #190 from qqobb/RunJS
wshanks Mar 15, 2021
e54f436
French translation
fflamerie Apr 3, 2021
f90cf63
Bump lodash from 4.17.19 to 4.17.21
dependabot[bot] May 10, 2021
bd67aa6
Merge pull request #194 from fflamerie/patch-13
wshanks Jun 1, 2021
5b696cc
Merge pull request #198 from wshanks/dependabot/npm_and_yarn/lodash-4…
wshanks Jun 1, 2021
c982a56
Mdnotes Shortcut Compatibility (#199)
knavynde Jun 1, 2021
cacdc72
Update changelog
wshanks Jun 1, 2021
a96579b
Version 3.9.0
wshanks Jun 1, 2021
a58a7de
Bump version to beta 3.9.1a1
wshanks Jun 1, 2021
95694cc
Bump glob-parent from 5.1.1 to 5.1.2
dependabot[bot] Jun 10, 2021
7f1b2da
Merge pull request #200 from wshanks/dependabot/npm_and_yarn/glob-par…
wshanks Jun 14, 2021
ac2504d
Wait for uiReadyPromise before initializing
dstillman Aug 28, 2021
993400e
Fix keyboard shortcuts for Zotero 6
dstillman Aug 29, 2021
fdb5f16
Update changelog
qqobb Aug 29, 2021
3503dc3
Merge pull request #204 from dstillman/wait-for-ui-ready
wshanks Aug 29, 2021
327fefc
Version 3.10.0
wshanks Aug 29, 2021
8b752ee
Bump version to beta 3.10.1a1
wshanks Aug 29, 2021
3e3ffd6
Bump ajv from 6.12.2 to 6.12.6
dependabot[bot] Feb 12, 2022
06cb141
Merge pull request #217 from wshanks/dependabot/npm_and_yarn/ajv-6.12.6
wshanks Feb 13, 2022
07fc607
Bump minimist from 1.2.5 to 1.2.6
dependabot[bot] Mar 24, 2022
33723e3
Merge pull request #220 from wshanks/dependabot/npm_and_yarn/minimist…
wshanks Mar 24, 2022
53184bf
Bump minimatch from 3.0.4 to 3.1.2
dependabot[bot] Apr 14, 2023
91e6eff
Bump ansi-regex from 4.1.0 to 4.1.1
dependabot[bot] Apr 14, 2023
f9d28bb
Merge pull request #254 from wshanks/dependabot/npm_and_yarn/ansi-reg…
wshanks Apr 18, 2023
8d53047
Merge pull request #253 from wshanks/dependabot/npm_and_yarn/minimatc…
wshanks Apr 18, 2023
e78f476
Add "Copy item IDs" (#271)
davidk55 Jul 21, 2024
b4a203d
Updates so that some features work with Zotero 7
wshanks Jun 2, 2023
42c333f
Version 4.0.0
wshanks Feb 9, 2025
7f7d2fc
Clarify current project status in README
wshanks Feb 9, 2025
fc42ec6
Fix typos in new README note
wshanks Feb 9, 2025
e79fabe
Update for Zotero 7.1
wshanks Feb 10, 2025
c21b4ef
Update version and changelog for 4.0.1
wshanks Feb 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
"prefer-arrow-callback": "off",
"prefer-const": "off",
"prefer-destructuring": "off",
"prefer-named-capture-group": "error",
"prefer-named-capture-group": "off",
"prefer-numeric-literals": "error",
"prefer-object-spread": "error",
"prefer-promise-reject-errors": "error",
Expand Down
87 changes: 86 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,90 @@
* In version 3.2.0b:
* In version 4.0.1:

+ Fixes for Zotero 7.1

* In version 4.0.0:

+ Fixes for Zotero 7.0
+ New copy item IDs function

* In version 3.10.0:

+ Fixes for Zotero 5.0.97-beta and upcoming Zotero 6

* In version 3.9.0:

+ Fix Open Style Editor shortcut
+ Add Open Run JavaScript window shortcut
+ Add mdnotes shortcuts
+ Update French translations

* In version 3.8.1:

+ Update French translations
+ Fix ZotFile Quick Extract shortcut
+ Fix show file shortcut

* In version 3.8.0:

+ Add find available PDFs shortcut

* In version 3.7.0:

+ Add ZotFile Quick Extract shortcut

* In version 3.6.1:

+ Update French locale

* In version 3.6.0:

+ Add "Paste item type" function for batch item type changes
+ Update French locale
+ Documentation updates

* In version 3.5.0:

+ Add "Open Zotero URI" function
+ Allow arbitrary number of alt quick copy functions
+ Fix "Retrieve metadata for PDF" shortcut
+ Update French locale

* In version 3.4.0:

+ Added shortcut for pushing reference to TeXstudio with Better BibTeX
+ Add "Advanced search" shortcut
+ Add "Locate item" shortcut
+ Add "Show Locate menu" shortcut
+ Add tag selector shortcuts:
- Toggle displaying automatic tags
- Toggle displaying all tags
- Deselect all tags
- Focus search box

* In version 3.3.3:

+ Filter attachments by mode before trying to modify paths

* In version 3.3.2:

+ Fix mishandling of attachments with paths that did not match the old path pattern in the modify attachments function.

* In version 3.3.1:

+ Fix add tag shortcut for Zotero 5.0.78

* In version 3.3.0:

+ Added shortcut for ZotFile's move and rename attachment

* In version 3.2.1:

+ Compatibility updates for Zotero 5.0.75

* In version 3.2.0:

+ Drop support for Zotero as a Firefox addon and for Zotero 4.x
+ Update item select link to newer format used by recent version of Zotero
+ Add functions to copy select links and web links to collections
+ Add copy/paste item field functions

Expand Down
20 changes: 2 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ BLDDIR = build
LOCALES := $(shell ls i18n)

INTERNAL_READMES := $(patsubst %, addon/chrome/locale/%/zutilo/README.html, $(LOCALES))
AMO_READMES := $(patsubst %, $(BLDDIR)/amo_readme/%/README.html, $(LOCALES))

# Necessary because zip copies leading directories if run from above targets
ABS_BLDDIR := $(shell realpath $(BLDDIR))

all: xpi amo_readme
all: xpi

0x0: $(BLDDIR)/zutilo.xpi
curl -F'file=@$(BLDDIR)/zutilo.xpi' https://0x0.st
Expand All @@ -26,25 +25,10 @@ addon/chrome/locale/%/zutilo/README.html:
$(BLDDIR)/internal_readme/$*/README.md > \
addon/chrome/locale/$*/zutilo/README.html

amo_readme: $(AMO_READMES)

$(BLDDIR)/amo_readme/%/README.html:
@mkdir -p $(dir $@)
scripts/substitute_relative_links \
--link-root https://www.github.com/willsALMANJ/Zutilo/blob/master/i18n/$*/readme \
i18n/$*/readme/README.md \
$(BLDDIR)/amo_readme/$*/README.md
pandoc -f markdown_strict -t html \
$(BLDDIR)/amo_readme/$*/README.md > \
$(BLDDIR)/amo_readme/$*/README.html
# Strip tags not allowed on addons.mozilla.org
sed -e 's/<p>//' -e 's#</p>#\n#' -e 's/h[1-9]>/strong>/g' -e 's#br />#\n#' \
-i $(BLDDIR)/amo_readme/$*/README.html

clean:
rm -f $(BLDDIR)/zutilo.xpi
rm -f $(INTERNAL_READMES)
rm -f $(AMO_READMES)
rm -rf $(BLDDIR)/internal_readme/*

.PHONY: all clean xpi amo_readme
.PHONY: all clean xpi
35 changes: 16 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,39 @@
# Zutilo
Zutilo is a plugin for [Zotero](http://www.zotero.org/) (both the Firefox addon and the standalone client).
Zutilo is a plugin for [Zotero](http://www.zotero.org/).
Zutilo adds several functions not available in base Zotero through extra menu items and keyboard shortcuts.
Here are some of Zutilo's features:

* Copy, paste, and remove sets of tags
* Select and right-click to relate several items
* Copy items to the clipboard in several formats
* Keyboard shortcuts for editing items and focusing and hiding different elements of the Zotero user interface
* Right-click to save link or document as an attachment to currently selected item (only for Zotero as a Firefox addon)

Zutilo strives to enable whatever Zotero workflow is desired and otherwise to get out of the way.
All of Zutilo's graphical elements can be disabled individually, so that unwanted features do not clutter the user interface.

**NOTE:** As of version 3.0, Zutilo is distributed from the [GitHub releases page](https://github.com/willsALMANJ/Zutilo/releases).
New updates will not be published to the location checked by previous versions of Zutilo (the Mozilla Add-ons page).
To receive new Zutilo updates, please update to the latest version of Zutilo.
> [!NOTE]
> Zutilo is largely maintained by one person (@wshanks) who does not have much time for Zutilo any more.
> @wshanks still uses Zotero but not as heavily and so has less need for the power user features of Zutilo.
> Additional help adapting to new releases of Zotero and fixing other bugs is very welcome.
> Without additional contributors, Zutilo may not be able to keep compatibility with future releases of Zotero.
> As of Zotero version 7.0, some features of Zutilo, mainly keyboard shortcuts, no longer function.
> There was also a long gap between the release of Zotero 7 and a release of Zutilo that could be installed with it.

## Installation

Download the Zutilo `zutilo.xpi` file from [Zutilo's GitHub releases page](https://github.com/willsALMANJ/Zutilo/releases).
Download the Zutilo `zutilo.xpi` file from [Zutilo's GitHub releases page](https://github.com/wshanks/Zutilo/releases).
Then go to Tools->Add-ons in Zotero Standalone.
Click on the gear button in the upper right area of the Add-ons Manager window that appears and choose "Install Add-on From File."
Then select the downloaded `zutilo.xpi` file.

**NOTE for Firefox users:** Firefox treats `.xpi` files as Firefox add-ons and tries to install them.
Rather than clicking on the `.xpi` file, you can try right-clicking and choosing to save the link as a file.
In some cases (particularly on Linux), Firefox does not allow right-clicking and saving the `.xpi` link either.
In that case, you must download it either with a different browser or with a command-line tool like `curl` or `wget`.

## Getting started

Zutilo can be customized via its preferences window, which can reached either via the Firefox Addons Manager or the Zotero action menu (the gear icon).
Zutilo can be customized via its preferences window, which can reached via the Zotero Addons Manager or the Tools menu.

### Zotero item menu

Expand All @@ -40,18 +48,7 @@ All of the functions that can appear in the item menu can also be called by keyb
Zutilo also provides some additional keyboard shortcut functions that are not available from the item menu.
By default, no keyboard shortcuts are defined.
A shortcut key combination can be set for each function in Zutilo's preferences.
If the key combination is already assigned for another Firefox function, a warning will be displayed.

### Firefox specific functions

Zutilo adds entries to the Zotero address bar icon's menu for saving items into Zotero with the opposite attachment behavior from that set in Zotero's preferences.
So if you have Zotero set to download attachments when saving an item, Zutilo will add an entry to save the item without attachments.
The extra menu items can be disabled in Zutilo's preferences.

Zutilo adds two entries to right-click menu in Firefox, one to save the current page as an attachment (most useful when the page is a pdf) and another to save a link as an attachment (if a link was right-clicked).
These menu items appear the Zotero submenu of the Firefox right-click menu.
In Zutilo's preferences, the menu items can be set to appear in the right-click menu directly (instead of the Zotero submenu) or can be disabled.
Whether the attachment files are imported to Zotero or downloaded and linked to Zotero items can be also be set in Zutilo's preferences.
If the key combination is already assigned for another function, a warning will be displayed.

## Usage notes

Expand Down
37 changes: 18 additions & 19 deletions addon/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,32 @@

"use strict";
/* global Components, Services */
/* global Zutilo */
/* global Zutilo, APP_SHUTDOWN */
const {classes: Cc, utils: Cu} = Components;
var chromeHandle

Cu.import("resource://gre/modules/Services.jsm");

const BOOTSTRAP_REASONS = [
"", // the bootstrap reason is 1 based
"APP_STARTUP",
"APP_SHUTDOWN",
"ADDON_ENABLE",
"ADDON_DISABLE",
"ADDON_INSTALL",
"ADDON_UNINSTALL",
"ADDON_UPGRADE",
"ADDON_DOWNGRADE"
];

// eslint-disable-next-line no-unused-vars
function install(data, reason) {

}

// eslint-disable-next-line no-unused-vars
function startup(data, reason) {
Cu.import("chrome://zutilo/content/zutilo.jsm");
Zutilo.init();
let aomStartup = Cc["@mozilla.org/addons/addon-manager-startup;1"].getService(Ci.amIAddonManagerStartup)
let manifestURI = Services.io.newURI(data.rootURI + "manifest.json");
chromeHandle = aomStartup.registerChrome(manifestURI, [
["content", "zutilo", "chrome/content/zutilo/"],
["locale", "zutilo", "en-US", "chrome/locale/en-US/zutilo/"],
["locale", "zutilo", "de", "chrome/locale/de/zutilo/"],
["locale", "zutilo", "es", "chrome/locale/es/zutilo/"],
["locale", "zutilo", "fr", "chrome/locale/fr/zutilo/"],
["locale", "zutilo", "zh-CN", "chrome/locale/zh-CN/zutilo/"]
])

Cu.import("chrome://zutilo/content/zutilo.js");
Zutilo.init(data.rootURI, Zotero);
}

// eslint-disable-next-line no-unused-vars
Expand All @@ -44,9 +44,6 @@ function shutdown(data, reason) {
var tmpWin=windows.getNext();

tmpWin.ZutiloChrome.removeXUL();
if (typeof tmpWin.ZutiloChrome.firefoxOverlay != 'undefined') {
tmpWin.ZutiloChrome.firefoxOverlay.unload();
}
if (typeof tmpWin.ZutiloChrome.zoteroOverlay != 'undefined') {
tmpWin.ZutiloChrome.zoteroOverlay.unload();
}
Expand All @@ -55,11 +52,13 @@ function shutdown(data, reason) {
}

Zutilo.cleanup();
chromeHandle.destruct()
chromeHandle = null

Cc["@mozilla.org/intl/stringbundle;1"].
getService(Components.interfaces.nsIStringBundleService).flushBundles();

Cu.unload("chrome://zutilo/content/zutilo.jsm");
Cu.unload("chrome://zutilo/content/zutilo.js");
}

// eslint-disable-next-line no-unused-vars
Expand Down
Loading