PageSourceSearch

https://adamanderson.github.io/assets/js/publications.js

js adamanderson.github.io collected 2026-10-03 08:32:36 UTC 2,395 bytes, 50 lines download raw bytes

1function getRecentPubs()
2{
3    //
4    $.get('https://inspirehep.net/api/literature?sort=mostrecent&size=10&q=find a Adam J Anderson', function(data) {
5        for (jrecord = 0; jrecord < data.hits.hits.length; jrecord++) {
6            var title = data.hits.hits[jrecord].metadata.titles[0].title;
7            var arxiv_text = 'arxiv:' + data.hits.hits[jrecord].metadata.arxiv_eprints[0].value;
8            var arxiv_link = 'https://arxiv.org/abs/' + data.hits.hits[jrecord].metadata.arxiv_eprints[0].value;
9            try {
10                if (data.hits.hits[jrecord].metadata.hasOwnProperty('publication_info')) {
11                    var journal_name = data.hits.hits[jrecord].metadata.publication_info[0].journal_title;
12                    journal_name = journal_name.replace(/\./g, '. ');
13                    if (journal_name.substr(journal_name.length - 1) == ' ') {
14                        journal_name = journal_name.slice(0, -1);
15                    }
16                    var journal_text = journal_name
17    
18                    if (data.hits.hits[jrecord].metadata.publication_info[0].hasOwnProperty('journal_volume')) {
19                        var journal_volume = data.hits.hits[jrecord].metadata.publication_info[0].journal_volume;
20                        journal_text += ', <strong>' + journal_volume + '</strong>';
21                    }
22    
23                    if (data.hits.hits[jrecord].metadata.publication_info[0].hasOwnProperty('page_start')) {
24                        var journal_page = data.hits.hits[jrecord].metadata.publication_info[0].page_start;
25                        journal_text += ', ' + journal_page;
26                    }
27    
28                    if (data.hits.hits[jrecord].metadata.publication_info[0].hasOwnProperty('year')) {
29                        var journal_year = data.hits.hits[jrecord].metadata.publication_info[0].year;
30                        journal_text += ', (' + journal_year + ')';
31                    }
32                }
33                else {
34                    var journal_text = '';
35                }
36            }
37            catch(TypeError) {
38                var journal_text = '';
39            }
40            finally {
41                $('#publications').append('<li><i>' + title + '</i>, <a href=' + arxiv_link + '>' + arxiv_text + '</a> ' + journal_text + '</li>')
42            }
43        }
44        
45        
46
47    });
48}
49
50getRecentPubs();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.