diff --git a/chrome/content/scripts/zoteroupdateifs.js b/chrome/content/scripts/zoteroupdateifs.js index d8b6799..0ca07b5 100644 --- a/chrome/content/scripts/zoteroupdateifs.js +++ b/chrome/content/scripts/zoteroupdateifs.js @@ -390,20 +390,26 @@ Zotero.UpdateIFs.showDataDir = function () { // 添加条目时自动添加影响因子及分区 Zotero.UpdateIFs.notifierCallback = { + notify: function (event, type, ids, extraData) { var addedItems = Zotero.Items.get(ids); var addUppdate = Zotero.Prefs.get('extensions.updateifs.add-update', true); // 是否在添加条目时更新 var items = []; + // 得到正常的条目 for (let item of addedItems) { if (event == 'add' && addUppdate && !item.isNote() && item.isRegularItem() && !item.isCollection()) { //Zotero.UpdateIFs.updateSelectedItems();// 20221126 - + items.push(item);// 20221126 } + } - Zotero.UpdateIFs.updateSelectedItem(items); - } + if (event == 'add' && addUppdate) { + Zotero.UpdateIFs.updateSelectedItem(items); + } + } //此处如果以“,”结尾会提示两次。 + }; diff --git a/install.rdf b/install.rdf index 284fb08..e1dc21c 100644 --- a/install.rdf +++ b/install.rdf @@ -7,7 +7,7 @@ RDF:about="urn:mozilla:install-manifest" em:id="zoteroupdateifs@redleafnew.me" em:name="Zotero Update IFs" - em:version="0.95.1" + em:version="0.95.2" em:type="2" em:creator="Minyi Han" em:description="Zotero plugin for update IF from http://sci.justscience.cn/" diff --git a/update.rdf b/update.rdf index 29ab630..e1a32ab 100644 --- a/update.rdf +++ b/update.rdf @@ -6,13 +6,13 @@ - 0.95.1 + 0.95.2 zotero@chnm.gmu.edu 5.0.0 6.* - https://github.com/redleafnew/zotero-updateifs/releases/download/0.95.1/zotero-updateifs.xpi + https://github.com/redleafnew/zotero-updateifs/releases/download/0.95.2/zotero-updateifs.xpi @@ -21,7 +21,7 @@ juris-m@juris-m.github.io 4.999 6.* - https://github.com/redleafnew/zotero-updateifs/releases/download/0.95.1/zotero-updateifs.xpi + https://github.com/redleafnew/zotero-updateifs/releases/download/0.95.2/zotero-updateifs.xpi