Waterstones Search

Extension Information
Extension File Name: 
Waterstones.js
Author: 
Richard Wallis
Extension Class Name: 
waterstonesJuice
Function Parameters: 

waterstonesJuice(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 window to launch "new"(default) | "overlay" | "iframe" | "current" - optional
  • insert1 - option for launch window - optional
  • insert2 - option for launch window - optional

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.

Dependencies: 

Extension is dependent on one ISBN value being stored in a Juice Meta definition named "isbns". This extension will not display in a selection panel if this value is not present. Note: Waterstones search only accepts single ISBNs, so only the first identified on page is used.

Example Code: 
juice.loadJs("http://{MyServer}/extensions/Waterstones.js");

new waterstonesJuice( juice,     'http://www.waterstones.com/waterstonesweb/graphics/global/branding_logo.gif',     'Search Waterstones',"current"
);