Skip to content

Commit 8fa26f4

Browse files
authored
Fix Annual Reivew alt URL schema (zotero#2857)
1 parent 352ef8a commit 8fa26f4

1 file changed

Lines changed: 50 additions & 3 deletions

File tree

Annual Reviews.js

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"inRepository": true,
1010
"translatorType": 4,
1111
"browserSupport": "gcsibv",
12-
"lastUpdated": "2021-09-14 18:37:45"
12+
"lastUpdated": "2022-08-02 12:48:22"
1313
}
1414

1515
/**
@@ -71,7 +71,7 @@ function addByBibTex(doi, tags) {
7171
}
7272

7373
function detectWeb(doc, url) {
74-
if (url.match(/\/doi\/(abs|full|pdf)\//)) {
74+
if (/\/doi\/(abs|full|pdf|10\.)/.test(url)) {
7575
return 'journalArticle';
7676
}
7777
else if (getSearchResults(doc, true)) {
@@ -110,7 +110,8 @@ function doWeb(doc, url) {
110110

111111

112112
function scrape(doc, url) {
113-
var match = url.match(/\/(?:abs|full|pdf)\/([^?]+)/);
113+
// match both /doi/abs/10.1146 (etc.) and /doi/10.1146
114+
var match = url.match(/\/(?:doi)\/(?:abs|full|pdf)?\/?([^?]+)/);
114115
if (match) {
115116
let tags = attr(doc, 'meta[name="dc.Subject"]', 'content')
116117
.split('; ')
@@ -277,6 +278,52 @@ var testCases = [
277278
"seeAlso": []
278279
}
279280
]
281+
},
282+
{
283+
"type": "web",
284+
"url": "https://www.annualreviews.org/doi/10.1146/annurev-physchem-040513-103712",
285+
"items": [
286+
{
287+
"itemType": "journalArticle",
288+
"title": "Phase Separation in Bulk Heterojunctions of Semiconducting Polymers and Fullerenes for Photovoltaics",
289+
"creators": [
290+
{
291+
"firstName": "Neil D.",
292+
"lastName": "Treat",
293+
"creatorType": "author"
294+
},
295+
{
296+
"firstName": "Michael L.",
297+
"lastName": "Chabinyc",
298+
"creatorType": "author"
299+
}
300+
],
301+
"date": "2014",
302+
"DOI": "10.1146/annurev-physchem-040513-103712",
303+
"abstractNote": "Thin-film solar cells are an important source of renewable energy. The most efficient thin-film solar cells made with organic materials are blends of semiconducting polymers and fullerenes called the bulk heterojunction (BHJ). Efficient BHJs have a nanoscale phase-separated morphology that is formed during solution casting. This article reviews recent work to understand the nature of the phase-separation process resulting in the formation of the domains in polymer-fullerene BHJs. The BHJ is now viewed as a mixture of polymer-rich, fullerene-rich, and mixed polymer-fullerene domains. The formation of this structure can be understood through fundamental knowledge of polymer physics. The implications of this structure for charge transport and charge generation are given.",
304+
"extra": "PMID: 24689796",
305+
"issue": "1",
306+
"itemID": "doi:10.1146/annurev-physchem-040513-103712",
307+
"libraryCatalog": "Annual Reviews",
308+
"pages": "59-81",
309+
"publicationTitle": "Annual Review of Physical Chemistry",
310+
"url": "https://doi.org/10.1146/annurev-physchem-040513-103712",
311+
"volume": "65",
312+
"attachments": [
313+
{
314+
"title": "Full Text PDF",
315+
"mimeType": "application/pdf"
316+
}
317+
],
318+
"tags": [
319+
{
320+
"tag": "organic electronics"
321+
}
322+
],
323+
"notes": [],
324+
"seeAlso": []
325+
}
326+
]
280327
}
281328
]
282329
/** END TEST CASES **/

0 commit comments

Comments
 (0)