diff options
| author | adamhrv <adam@ahprojects.com> | 2019-03-30 15:56:33 +0100 |
|---|---|---|
| committer | adamhrv <adam@ahprojects.com> | 2019-03-30 15:56:33 +0100 |
| commit | 8f6af7c6818dd527a80c149b5e11c764453ffd31 (patch) | |
| tree | c2d9add991d8bd09f01a7b8fe0fb84239201bb73 /scraper/client/paper/paper.verify.js | |
| parent | 19daac1fe803953bd47c82cac11f20680a150961 (diff) | |
| parent | a5f7d45e45439ff3da8ab570af1bf90fb0b15303 (diff) | |
fix merge
Diffstat (limited to 'scraper/client/paper/paper.verify.js')
| -rw-r--r-- | scraper/client/paper/paper.verify.js | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/scraper/client/paper/paper.verify.js b/scraper/client/paper/paper.verify.js index f5dbc13c..1301239b 100644 --- a/scraper/client/paper/paper.verify.js +++ b/scraper/client/paper/paper.verify.js @@ -195,13 +195,14 @@ class PaperVerify extends Component { <h3>{citation.title}</h3> <div className='gray'> {citation.id} - {' | PDFs: '} - {citation.pdf.map((pdf,i) => { + {citation.pdf.length ? ' | PDF: ' : ''} + {citation.pdf.map((pdf, i) => { const domain = pdf.replace('www.','').split('/').slice(2,3)[0] || 'unknown' return ( <a key={i} href={pdf} + rel={"noopener noreferrer"} onClick={() => this.setState({ pdf_index: i })} className={i === this.state.pdf_index ? 'selected pdfLink' : 'pdfLink'} > @@ -209,13 +210,39 @@ class PaperVerify extends Component { </a> ) })} + {(citation.doi && citation.doi.length) ? ' | DOI: ' : ''} + {(citation.doi || []).map((doi, i) => { + if (!doi) return null + const domain = doi.replace('www.','').split('/').slice(2,3)[0] || 'unknown' + return ( + <a + key={i} + href={doi} + target={"_blank"} + rel={"noopener noreferrer"} + className={'pdfLink'} + > + {'[' + domain + ']'} + </a> + ) + })} {' | '} <a href={'https://www.semanticscholar.org/paper/' + citation.id} target="_blank" + rel={"noopener noreferrer"} + className={'pdfLink'} + > + {'Semantic Scholar'} + </a> + {' | '} + <a + href={'https://duckduckgo.com/?q=' + encodeURIComponent(citation.title)} + target="_blank" + rel={"noopener noreferrer"} className={'pdfLink'} > - {'[semantic scholar]'} + {'Search DuckDuckGo'} </a> </div> |
