User:Wouterstomp/Bookmarklet

To use Wouterstomp's handy bookmarklet that uses Diberri's tool to make a wikipedia reference when used on a PubMed abstract page, do the following:

To use Wouterstomp's handy bookmarklet that uses Diberri's tool to make a wikipedia reference when used on a PubMed abstract page, do the following:

  • Create a bookmark within Internet Explorer (i.e. Favorites >> Add to Favorites...) with a suitable name.
  • Then right click on the bookmark just created and select Properties
  • Paste across to the URL box the following javascript line in its entirety: javascript:(function(){var url = location.href;var pmid = url.match(/\/pubmed\/(\d+)/);if( pmid ) w=open('http://diberri.crabdance.com/cgi-bin/templatefiller/index.cgi?type=pubmed_id&id=' + pmid[1],'add','width=800,height=300,scrollbars,resizable');})();

When the Bookmarklet is clicked whilst on a PubMed abstract page, it will open a new window with the properly formatted wikipedia citation for the article. The { {cite journal} } template may now be copied and pasted across.

Here is an experimental improved version which also works on drugbank, hgnc, pubmed central and pubchem pages:

javascript:(function(){var url = location.href;var pmid = url.match(/\/pubmed\/(\d+)/);var drugbankid = url.match(/drugs\/DB(\d+)/);var hgncid = url.match(/hgnc_id=(\d+)/);var pmcartid = url.match(/artid=(\d+)/);var pcid = url.match(/cid=(\d+)/);if(pmid) w=open('http://diberri.crabdance.com/cgi-bin/templatefiller/index.cgi?type=pubmed_id&id='%20+%20pmid[1],'add','width=800,height=300,scrollbars,resizable');if(drugbankid) w=open('http://diberri.crabdance.com/cgi-bin/templatefiller/index.cgi?type=drugbank_id&id=DB'+drugbankid[1]+'&vertical=1','add','width=800,height=300,scrollbars,resizable');if(hgncid) w=open('http://diberri.crabdance.com/cgi-bin/templatefiller/index.cgi?&type=hgnc_id&id='+hgncid[1]+'&vertical=1','add','width=800,height=300,scrollbars,resizable');if(pmcartid) w=open('http://diberri.crabdance.com/cgi-bin/templatefiller/index.cgi?type=pubmedcentral_id&id='+pmcartid[1],'add','width=800,height=300,scrollbars,resizable');if(pcid) w=open('http://diberri.crabdance.com/cgi-bin/templatefiller/index.cgi?type=pubchem_id&id='%20+%20pmid[1],'add','width=800,height=300,scrollbars,resizable');})();

For generating a citation from a pmid selected in the text of another webpage (adapted from scripts here):

javascript:s='';function%20gS(w){for(var%20i=0;i<w.length;i++){gS(w.frames[i])};try{s+=w.window.getSelection()}catch(e){try{s+=w.document.selection.createRange().text}catch(e){s+=''}}}gS(top);{void(window.open('http://diberri.crabdance.com/cgi-bin/templatefiller/index.cgi?type=pubmed_id&id='+s,'diberri',''))}

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.