Upload
andrew-preater
View
2.650
Download
2
Embed Size (px)
DESCRIPTION
I presented this talk on JavaScript in Encore 4.2 at the European Innovative Users Group (EIUG) 2012 conference held at University of Leeds, 20-21 June 2012. I describe a new feature in Encore 4.2 that allows for customising the Encore record display using JavaScript. I discuss examples of what I have done at Senate House Library using this.
Citation preview
Customizing Encore 4.2 with JavaScript
Andrew PreaterSenate House LibrariesUniversity of London
http://bit.ly/uol175
Your JavaScript in Encore 4.2
Examples
What I’ll talk about
1. Persistent link
2. Social bookmarking buttons
3. QR codes
4. Tweaking Amazon jackets
5. Store requests
6. LibraryThing for Libraries
Examples
Beta testing from January 2012
Live in March 2012
Encore 4.2
div#footerArea
Your scripts
div#customTop
div#customBottom
div#customSidebar
Examples
Persistent link
Simple example
1. Get bib number from document.URL
http://encore.ulrls.lon.ac.uk/iii/encore/record/C__Rb1000880__SJos%C3%A9%20Saramago__Ff%3Afacetlocations%3Aull%3Aull%3ASENATE%20HOUSE%20LIBRARY%3A%3A__Ff%3Afacetlanguages%3Aeng%3Aeng%3AEnglish%3A%3A__Ff%3Afacetfields%3Aauthor%3Aauthor%3AAuthor%3A%3A__Ff%3Afacetavailability%3Atrue%3Atrue%3AAt%20the%20library%3A%3A__P0%2C11__Orightresult__X4?lang=eng&suite=cobalt
3. Write the innerHTML of the div
2. Create a div using document.createElement
Include the persistent URL:
http://encore.ulrls.lon.ac.uk/iii/encore/record/C__R + bib number
4. Attach it to the customBottom div using appendChild
Social bookmarking links
Social bookmarking links
QR codes
QR codes
http://encore.ulrls.lon.ac.uk/iii/mobile/record/C__Rb1000880?lang=eng&utm_source=encore&utm_medium=qr&utm_campaign=mobile
bit.ly/L6YtmR
QR codes
Tweaking Amazon book jackets
Amazon jackets
Amazon jackets
Get your ISBN here:var key = "ISBN:9781844678785"
1. If length is 13, convert it to an ISBN-10
2. Rewrite jacket img src and href
Amazon jackets
Requesting journals from store
Store requests
Done in WebBridge in classic catalogue
No WebBridge bib resource table in Encore
Not an acceptable alternative
div#toggleAnyComponent
LibraryThing for Librarieswww.librarything.com/forlibraries
1. Append an element with LTfL divs in it.
2. Source LTfL JS after
LibraryThing
Similar items
Reviews
Tag browser
Bib record display only
Limit is what you can do with JavaScript
Limitations
Please steal and improve my JavaScript:http://bit.ly/encore42js
Encore wikihttp://csdirect.iii.com/lswiki/Encore/