Skip to content

Commit 250ef59

Browse files
committed
- Do not de-duplicate citedArticlesIds against seedArticles, as LCN now shows all references in second-tab's table (called "All Cited" in web verison) and not just top 10
- Add datetime to the graph's tabLabel
1 parent 301c8de commit 250ef59

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

index.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1546,7 +1546,7 @@ const vm = new Vue({
15461546
tabTitle: source.id ? source.title : this.listName,
15471547
bookmarkletURL: this.bookmarkletURL,
15481548
API: API,
1549-
allCited: retrieveCitedArticles === Infinity && ['OpenAlex', 'Semantic Scholar'].includes(API),
1549+
allCited: retrieveCitedArticles === Infinity && ['OpenAlex', 'Semantic Scholar', 'Zotero Cita'].includes(API), // Zotero Cita shows All Cited (i.e. all references)
15501550
allCiting: retrieveCitingArticles === Infinity && ['OpenAlex', 'Semantic Scholar'].includes(API),
15511551
timestamp: Date.now(),
15521552
localCitationNetworkVersion: localCitationNetworkVersion
@@ -1568,6 +1568,10 @@ const vm = new Vue({
15681568
// Sort and slice for Top References
15691569
.sort((a, b) => referenced[b].length - referenced[a].length).slice(0, retrieveCitedArticles)
15701570
}
1571+
// Zotero Cita shows All Cited (i.e. all references) => do not de-duplicate against seedArticles like above
1572+
if (retrieveCitedArticles === Infinity && API === 'Zotero Cita') {
1573+
citedArticlesIds = Object.keys(referenced)
1574+
}
15711575

15721576
this.callAPI((retrieveCitedArticles === Infinity && ['OpenAlex', 'Semantic Scholar'].includes(API)) ? seedArticlesIdsWithoutSource : citedArticlesIds, data => this.retrievedCitedArticles(data, API, newGraph, retrieveCitingArticles, citing, seedArticlesIds), API, 'references', retrieveCitedArticles, 0)
15731577
},
@@ -2240,6 +2244,7 @@ const vm = new Vue({
22402244
window.document.title = this.getString('title')
22412245
const listOfKeys = urlParams.has('listOfKeys') ? urlParams.get('listOfKeys').split(',') : []
22422246

2247+
// Zotero Cita shows All Cited (i.e. all references)
22432248
this.retrieveCitedArticles = Infinity
22442249
this.retrieveCitingArticles = 0
22452250

@@ -2250,7 +2255,7 @@ const vm = new Vue({
22502255
return dois
22512256
}, []
22522257
)
2253-
this.listName = 'Zotero Cita'
2258+
this.listName = 'Zotero Cita ' + (new Date().toLocaleString('en-CA', {hour12: false}).replace(", ", " ").substr(0,16)) // Add datetime (YYYY-MM-DD HH:MM) so that the graph's tabLabel becoms more unique and multiple Cita JSON files can be opened at the same time
22542259

22552260
this.createNewNetwork({ references: listOfKeys, citations: [] })
22562261
}

0 commit comments

Comments
 (0)