rem: var pmid = ''; var re = /PMID:\s+(\d+)\s+/; var html = document.body.innerHTML; var pos = html.search(re); 
add: var html = document.evaluate(" document.body, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;  if (html != null){  html = html.innerHTML;  var re = /PMID:\s+(\d+)\s+/;  var pos = html.search(re); 
context: function insertPubmed2Pdfetch(){    var pmid = '';    var re = /PMID:\s+(\d+)\s+/;    var html = document.body.innerHTML;    var pos = html.search(re);        if (pos>=0){        pmid =re.exec(html)[1]; 	        var a = document.createElement("a");        a.setAttribute("title","Download reprint of this article using PDFetch");        a.setAttribute("href","http://localhost:8888/fetch/"+pmid);        a.setAttribute("class","dblinks");            var anchor = document.createTextNode("Download");            a.appendChild(anchor);        var e = document.evaluate(                                  "//span[@class='linkbar']",                                  document.body,                                  null,                                  XPathResult.FIRST_ORDERED_NODE_TYPE,                                  null).singleNodeValue;        e.appendChild(a);    }}
meta: 2608	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2608/f1f7024c5c6c4c4a71ff97696d5b9ac989de0a17/pubmed2pdfetch.user.js/clean/pubmed2pdfetch.user.js