Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Boilerplate for this plugin was based on Zotero's sample plugin for v7 [Make-It-
- Run Zotero (version 7.x)
- Go to `Tools -> Add-ons`
- `Install Add-on From File`
- Choose the file `zoterocitationcountsmanager-2.0.0.xpi`
- Choose the file `zoterocitationcountsmanager-2.0.1.xpi`
- Restart Zotero

## License
Expand Down
2 changes: 1 addition & 1 deletion bin/build
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

cd ..

version='2.0'
version='2.0.1'

rm -f zoterocitationcountsmanager-${version}.xpi
zip -r zoterocitationcountsmanager-${version}.xpi locale/* manifest.json bootstrap.js preferences.js preferences.xhtml prefs.js zoterocitationcounts.js
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Zotero Citation Counts Manager",
"version": "2.0",
"version": "2.0.1",
"description": "Enhanced Citation Counts Manager for Zotero 7",
"homepage_url": "https://github.com/FrLars21/ZoteroCitationCountsManager",
"applications": {
Expand Down
4 changes: 2 additions & 2 deletions zoterocitationcounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,13 +389,13 @@ ZoteroCitationCounts = {
* Ref: https://www.zotero.org/support/kb/item_types_and_fields#citing_fields_from_extra
*/
_setCitationCount: function (item, source, count) {
const pattern = /^Citations \(${source}\):|^\d+ citations \(${source}\)/i;
const pattern = /^Citations: \d+ \(${source}|^Citations \(${source}\):|^\d+ citations \(${source}\)/i;
const extraFieldLines = (item.getField("extra") || "")
.split("\n")
.filter((line) => !pattern.test(line));

const today = new Date().toISOString().split("T")[0];
extraFieldLines.unshift(`${count} citations (${source}) [${today}]`);
extraFieldLines.unshift(`Citations: ${count} (${source}, ${today})`);

item.setField("extra", extraFieldLines.join("\n"));
item.saveTx();
Expand Down