Library Thing Search

Extension Information
Extension File Name: 
LibraryThing.js
Author: 
Richard Wallis
Extension Class Name: 
LibraryThingSearchJuice
Function Parameters: 

librarythingSearchJuice(ju,src,text,defPanel,launchType,insert1,insert2)

  • ju - instance of juice
  • src - url to logo to display in selection panel
  • text - text to display in selection panel
  • launchType - type of widow to launch "new"(default) | "overlay" | "iframe" | "current" - optional
  • insert1 - option for launch window - optional
  • insert2 - option for launch window - optional
Dependencies: 

Loaded modules

juice.loadJs("http://{MyServer}/extensions/LibraryThing.js");

Data requirements

Extension is dependent on a Juice Meta definition named "title". This extension will not display in a selection panel if this value is not present.

 

 

Example Code: 

Upon construction this extension inserts the passed icon & text in to the relevant selection panels with css classes set to 'juiceXInactiveIcon' and 'juiceXInactiveText'. Once initialized thes are changed to 'juiceXActiveIcon' and 'juiceXActiveText', and they become clickable. Once clicked, a window of the passed type is launched to display the site.

new librarythingSearchJuice( juice,
 
'http://{myserver}/images/librarything-logo.gif',
 
'Search LibraryThing'
);