Difference between revisions of "Firefox"

From TEIWiki
Jump to navigation Jump to search
(fix bug in bookmarklet on Firefox v41; an empty selection is still a selection - needs to convert to string)
(Bookmarklet access)
Line 27: Line 27:
 
<pre>
 
<pre>
 
<nowiki>
 
<nowiki>
javascript:Qr=document.getSelection().toString();%
+
javascript:Qr=document.getSelection().toString();
 
if(Qr==''){void(Qr=prompt('P5%20Element%20Name:%20',''))};
 
if(Qr==''){void(Qr=prompt('P5%20Element%20Name:%20',''))};
 
if(Qr)location.href=
 
if(Qr)location.href=

Revision as of 14:02, 25 September 2015

Bookmarklet access

As I tend to look up the reference section for TEI elements in the P5 Guidelines on a regular basis, I've created some bookmarklets on my Mozilla Firefox Bookmarks Toolbar. These help me get to the information I'm after more swiftly. If they interest you, you are welcome to them. One of them is given below. To add some of the ones I use see: http://james.cummingsfamily.org.uk/TEI-LookUp.html Or to add one to your bookmarks toolbar yourself:

  1. Highlight and copy the code below
  2. Click on 'Bookmarks', then 'Organize Bookmarks'
  3. Select the 'Bookmarks Toolbar Folder'
  4. Click 'New Bookmark' icon (or 'File' -> 'New Bookmark')
  5. Type 'TEI P5 LookUp' (or similar) as the 'name'
  6. Paste the code your copied into 'location'
  7. Optionally give this a keyword shortcut (see below for more details) and description
  8. Click Ok to save the bookmark
  9. If the bookmark ends up somewhere else, drag and drop it back in the 'Bookmarks Toolbar Folder'
  10. Close the Bookmark Manager.

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

In Firefox, you will need to use the following bookmarklet:


javascript:Qr=document.getSelection().toString();
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'

Keyword access

Another method in Firefox you can use is:

  1. Go to Bookmarks -> Organize Bookmarks -> New Bookmark
  2. Add a location such as http://www.tei-c.org/release/doc/tei-p5-doc/en/html/ref-%s.html where "%s" indicates that this portion of the URL will be variable
  3. Add a name (e.g., TEI reference) and optionally description
  4. Add a keyword such as "tei" or even just "t" if you may use this frequently enough
  5. Hit OK.

Now you will be able to go to the location bar (where you type "http:..." etc. normally)--you might learn the keyboard shortcut (control-L) to be even faster) and do something like this:

   tei valList

and after hitting return, you'll get brought to that reference page...

To import a predefined set of such shortcuts (to also jump to TEI Chapters, search this wiki, etc., see this file...

  1. go to Bookmarks -> Organize bookmarks
  2. On the window that appears, go to File -> Import
  3. Choose "From File"
  4. Find the attached file on your hard drive and click ok.

Then to use its contents,

  1. Go to the URL Location bar (control-L is a nice fast way)
  2. To go to a specific chapter, type teiN, where "N" is the chapter number. e.g., "tei7" or "teivi". The appendices are by lower case letter number, except for the probably most frequently used, A, B, and C ('m' for model classes, 'e' for elements, 'a' or attributes, respectively) and E ('b' for bibliography - done to avoid conflicting with 'e' for elements). For example, you'd type teie to go to the elements page. "teitoc" brings you to the Table of Contents.
  3. To search for specific content in the Guidelines, type "tgoo" then a space and then the content to search for. This will use Google to search at just the TEI site for the content you specify.
  4. To search at the wiki, 'teiw' followed by a space and the page title searches for a page by wiki title, while 'teiws' followed by a space and search terms searches for content at the wiki.

You can view the shortcuts by going to Bookmarks -> Organize Bookmarks . To edit their features, including optionally redefining the keyword shortcuts (but be sure not to use the same keyword used elsewhere), you can single-click an entry in the window that appears and click "Properties". (You can sort the list by keyword, etc. for a better view.)