| Description |
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs
title="Google Scholar searchbox"
description="Based on Caleb Eggensperger's Other Google Searches module but just Google Scholar because that's all I wanted. You need to allow popups from gmodule.com for it to work."
author="Zac Hanley"
author_email="ortholog+modulefeedback@gmail.com"
screenshot="http://www.ortholog.com/archive/images/Google-Scholar-searchbox-module.jpg"
author_affiliation="ortholog.com"
title_url="http://scholar.google.com/"
height="80"
render_inline="optional" />
<UserPref name="showlogo" display_name="Show Logo?" datatype="bool" default_value="true" />
<Content type="html">
<![CDATA[
<script type="text/javascript">
function buildForm__MODULE_ID__(prefs) {
var prefs = new _IG_Prefs(__MODULE_ID__);
// Indicates whether to show Google Scholar logo
var logo = prefs.getBool("showlogo");
// Start building the form.
document.write("<form method='get' action='http://scholar.google.com/scholar' target='_blank' style='margin-top:10;'>");
// Change behaviour based on whether user wants logo or not.
if (prefs.getBool("showlogo") == true) {
document.write("<p style='margin-left:10px;'><a href='http://scholar.google.com/'><img style='border:none;text-align:center;' src='http://scholar.google.com/scholar/scholar_sm.gif' alt='Google Scholar' width='105' height='40' /></a><br>");
}
// Continue the form.
document.write("<input type='text' name='q' size='15' maxlength='255' value='' /> ");
// Change button text based on whether Google Scholar logo displayed.
if (prefs.getBool("showlogo") == true) {
document.write("<input type='submit' name='btnG' value='Search' />");
} else {
document.write("<input type='submit' name='btnG' value='Scholar Search' />");
}
// End the form.
document.write("</p></form>");
}
// Pass the userprefs for this gadget instance to the function
// (allows users to include multiple gadget instances on their page)
buildForm__MODULE_ID__(new _IG_Prefs(__MODULE_ID__));
</script>
]]>
</Content>
</Module>
|
| |
| Contact |
|
|
| |
|
|
|
| This item has been viewed 115703 times. | |
|
|