atom feed4 messages in edu.brown.listserv.tei-lBookmarklet for looking up a TEI element
FromSent OnAttachments
Martin HolmesNov 18, 2011 11:00 am 
James CummingsNov 18, 2011 11:34 am 
Ron Van den BrandenNov 18, 2011 11:42 am 
Brett BarneyNov 18, 2011 12:02 pm 
Subject:Bookmarklet for looking up a TEI element
From:Martin Holmes (mhol@UVIC.CA)
Date:Nov 18, 2011 11:00:06 am
List:edu.brown.listserv.tei-l

Hi all,

Some time ago, some kind soul posted a Firefox bookmarklet that's very handy for looking up a TEI element -- you either select the element name on a web page and click on it, or click on it without selecting anything and get prompted to type or paste the element name in, and then it takes you straight to the Guidelines spec for the element.

It recently stopped working after an upgrade to Firefox, and I've figured out how to get it working again, so in case anyone else is using it, this is functional with current versions of Firefox:

javascript:Qr=document.getSelection();if(Qr==''){void(Qr=prompt('P5%20Element%20Name:%20',''))};if(Qr!='')location.href='http://www.tei-c.org/release/doc/tei-p5-doc/en/html/ref-'+escape(Qr)+'.html'

Essentially, the change was from:

if(!Qr) to if (Qr=='')

and

if(Qr) to if (Qr!='')

I have similar things for finding Bugs and Feature Requests on the TEI SourceForge Tracker:

javascript:Qr=document.getSelection();if(Qr==''){void(Qr=prompt('Bug%20Id:%20',''))};if(Qr!='')location.href='http://purl.org/tei/bug/'+escape(Qr)

javascript:Qr=document.getSelection();if(Qr==''){void(Qr=prompt('Feature%20request%20Id:%20',''))};if(Qr!='')location.href='http://purl.org/tei/FR/'+escape(Qr)

Unfortunately, you have to know whether what you're looking for is a bug or a feature request; just knowing the ticket number is not enough. I can't figure out a way around that.

Cheers, Martin