Skip to content

Commit

Permalink
Close #7
Browse files Browse the repository at this point in the history
rollback to old regular expression rule.
  • Loading branch information
nico-zck committed Apr 6, 2022
1 parent 0414644 commit aacca59
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
6 changes: 3 additions & 3 deletions chrome/content/zsc.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ let zsc = {
_extraEntrySep: "\n",
};

zsc._extraRegex = new RegExp(zsc._extraPrefix + ".{0,20}" + zsc._extraEntrySep);
zsc._extraRegex = new RegExp(zsc._extraPrefix + ".{0,20}");

zsc.init = function () {
let stringBundle = document.getElementById("zoteroscholarcitations-bundle");
Expand Down Expand Up @@ -156,7 +156,7 @@ zsc.updateItem = function (item, citeCount) {
if (isDebug())
Zotero.debug("[scholar-citations] current extra field is: " + curExtra);

let newExtra = zsc.buildCiteCountString(citeCount) + zsc._extraEntrySep;
let newExtra = zsc.buildCiteCountString(citeCount);
if (zsc._extraRegex.test(curExtra)) {
// if already have ZSCC string
newExtra = curExtra.replace(zsc._extraRegex, newExtra);
Expand All @@ -166,7 +166,7 @@ zsc.updateItem = function (item, citeCount) {
);
} else {
// if not have ZSCC string
newExtra = newExtra + curExtra;
newExtra = newExtra + zsc._extraEntrySep + curExtra;
if (isDebug())
Zotero.debug("[scholar-citations] add ZSCC to extra field " + newExtra);
}
Expand Down
4 changes: 2 additions & 2 deletions install.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
<Description about="urn:mozilla:install-manifest">
<em:id>[email protected]</em:id>
<em:name>Zotero Scholar Citations</em:name>
<em:version>2.1.0</em:version>
<em:version>2.1.1</em:version>
<em:type>2</em:type>
<em:multiprocessCompatible>true</em:multiprocessCompatible>
<em:creator>Nico</em:creator>
<em:homepageURL>https://github.com/nico-zck/zotero-scholar-citations</em:homepageURL>
<em:optionsURL>chrome:https://zoteroscholarcitations/content/options.xul</em:optionsURL>
<em:updateURL>https://github.com/nico-zck/zotero-scholar-citations/master/update.rdf</em:updateURL>
<em:updateURL>https://raw.githubusercontent.com/nico-zck/zotero-scholar-citations/master/update.rdf</em:updateURL>

<em:targetApplication>
<Description>
Expand Down
13 changes: 11 additions & 2 deletions update.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,23 @@
<rdf:Seq>
<rdf:li>
<rdf:Description>
<em:version>2.1.0</em:version>
<em:version>2.1.1</em:version>

<em:targetApplication>
<rdf:Description>
<em:id>[email protected]</em:id>
<em:minVersion>5.0.0</em:minVersion>
<em:maxVersion>6.*</em:maxVersion>
<em:updateLink>https://github.com/nico-zck/zotero-scholar-citations/releases/download/2.1.0/zotero-scholar-citations-2.1.0.xpi</em:updateLink>
<em:updateLink>https://github.com/nico-zck/zotero-scholar-citations/releases/download/2.1.1/zotero-scholar-citations-2.1.1.xpi</em:updateLink>
</rdf:Description>
</em:targetApplication>

<em:targetApplication>
<rdf:Description>
<em:id>[email protected]</em:id>
<em:minVersion>4.999</em:minVersion>
<em:maxVersion>6.*</em:maxVersion>
<em:updateLink>https://github.com/nico-zck/zotero-scholar-citations/releases/download/2.1.1/zotero-scholar-citations-2.1.1.xpi</em:updateLink>
</rdf:Description>
</em:targetApplication>

Expand Down

0 comments on commit aacca59

Please sign in to comment.