Skip to content

Commit

Permalink
修复四川大学不显示
Browse files Browse the repository at this point in the history
  • Loading branch information
redleafnew committed Apr 17, 2023
1 parent 8f6eb62 commit 9438bef
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 4 deletions.
1 change: 1 addition & 0 deletions addon/chrome/locale/en-US/addon.properties
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ xmu = XMU
sjtu = SJTU
fdu = FDU
hhu = HHU
scu = SCU
cqu = CQU
nju = NJU
xju = XJU
Expand Down
1 change: 1 addition & 0 deletions addon/chrome/locale/zh-CN/addon.properties
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ xmu = 厦门大学
sjtu = 上海交通大学
fdu = 复旦大学
hhu = 河海大学
scu = 四川大学
cqu = 重庆大学
nju = 南京大学
xju = 新疆大学
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "greenfrog",
"version": "0.8.0",
"version": "0.8.1",
"description": "Zotero plugin for update journal information from easyScholar",
"config": {
"addonName": "Green Frog",
Expand Down
23 changes: 23 additions & 0 deletions src/modules/examples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,10 @@ export class KeyExampleFactory {
if (hhu && easyscholarData['hhu']) {
ztoolkit.ExtraField.setExtraField(item, '河海大学', easyscholarData['hhu']);
}
// 四川大学
if (scu && easyscholarData['scu']) {
ztoolkit.ExtraField.setExtraField(item, '四川大学', easyscholarData['scu']);
}
// 重庆大学
if (cqu && easyscholarData['cqu']) {
ztoolkit.ExtraField.setExtraField(item, '重庆大学', easyscholarData['cqu']);
Expand Down Expand Up @@ -1853,6 +1857,25 @@ export class UIExampleFactory {
await ztoolkit.ItemTree.unregister("hhu");
}

// 四川大学
if (scu) {
await ztoolkit.ItemTree.register(
"scu",
getString("scu"),
(
field: string,
unformatted: boolean,
includeBaseMapped: boolean,
item: Zotero.Item
) => {
// return String(item.id);
var IFscu = ztoolkit.ExtraField.getExtraField(item, '四川大学')
return String(IFscu == undefined ? '' : IFscu);
},
);
} else {
await ztoolkit.ItemTree.unregister("scu");
}
// 重庆大学
if (cqu) {
await ztoolkit.ItemTree.register(
Expand Down
4 changes: 2 additions & 2 deletions update.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"greenfrog@redleafnew.me": {
"updates": [
{
"version": "0.8.0",
"version": "0.8.1",
"update_link": "https://github.com/redleafnew/zotero-updateifsE/releases/latest/download/greenfrog.xpi",
"applications": {
"gecko": {
Expand All @@ -12,7 +12,7 @@
}
},
{
"version": "0.8.0",
"version": "0.8.1",
"update_link": "https://github.com/redleafnew/zotero-updateifsE/releases/latest/download/greenfrog.xpi",
"applications": {
"zotero": {
Expand Down
2 changes: 1 addition & 1 deletion update.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<rdf:Seq>
<rdf:li>
<rdf:Description>
<em:version>0.8.0</em:version>
<em:version>0.8.1</em:version>
<em:targetApplication>
<rdf:Description>
<em:id>zotero@chnm.gmu.edu</em:id>
Expand Down

0 comments on commit 9438bef

Please # to comment.