Search Link Panel

By schreque Last update Nov 8, 2011 — Installed 1,383 times.

Script Summary: Creates and adds search links on your favorite pages



Version: 0.5

/**
 * This function creates a panel of search links following to another sites. 
 * The panel is constructed from the data provided to the function. 
 * It is returned as a string and can be inserted automatically 
 * if a container is provided. 
 *
 * Options is unsorted list of parameters that defines what and how should be shown.
 * The structire of the list is as follows:
 *
 * {
 * 	tmplItem:	String, contains the template per each item of the list
 * 			valid patterns are {HREF}, {TEXT}, {ICON}
 * 
 * 	tmplList:	String, contains the template of the list
 * 			Valid pattern is {LIST}
 * 
 * 	container:	DOM element, contains a reference to the html-element 
 * 			where the list sould be inserted
 * 
 * 	links:	[	Array, contains the list of links and their attributes to show
 * 		{
 * 			text:		String, a text that will be shown
 * 
 * 			addr:		String or function returning a string, 
 * 					an URL following to another site
 * 					Valid pattern is {SEEK}
 * 
 * 			template:	String, contains the template for this link
 * 
 * 			icon:		String, an URL to the image favicon.ico
 * 
 * 			transform:	Function, a functin that transforms a seach text
 * 					It can be useful if some sites requires text in UTF
 * 		}, 
 * 	]
 * }, 
 *
 * @param	String	text
 * @param	Object	options
 * @return	String
 */