Browse Source

Javascript code now uses all relevant CSS styles (purebibtex for <pre>)

replace/c24a8d1de403113542ba0936e844151de2785013
Martin Monperrus 15 years ago
parent
commit
9ba3742f65
  1. 2
      bibtexbrowser.php

2
bibtexbrowser.php

@ -1738,7 +1738,7 @@ $('a.biburl').each(function(item) { // for each url "[bib]"
if (biburl.nextAll('pre').length == 0) { // we don't have yet the bibtex data if (biburl.nextAll('pre').length == 0) { // we don't have yet the bibtex data
var bibtexEntryUrl = $(this).attr('href'); var bibtexEntryUrl = $(this).attr('href');
$.ajax({url: bibtexEntryUrl, dataType: 'xml', success: function (data) { // we download it $.ajax({url: bibtexEntryUrl, dataType: 'xml', success: function (data) { // we download it
var elem = $('<pre/>'); // the element containing bibtex entry, creating a new element is required for Chrome and IE
var elem = $('<pre class="purebibtex"/>'); // the element containing bibtex entry, creating a new element is required for Chrome and IE
elem.text($('.purebibtex', data).text()); // both text() is required for IE elem.text($('.purebibtex', data).text()); // both text() is required for IE
// we add a link so that users clearly see that even with AJAX // we add a link so that users clearly see that even with AJAX
// there is still one URL per paper (which is important for crawlers and metadata) // there is still one URL per paper (which is important for crawlers and metadata)

Loading…
Cancel
Save