Speaking of...I just finished putting together an add-on based off of the GoogleSpell one which uses SOAP and WSDL to grab dictionary, thesaurus, and stock information and pop it up like a qsfind.
My prefered shortcut for it is ':?' as the dictionaries are ':' anyway ; ). Some minor changes which might be a good idea to make in GoogleSpell would be to change the names of the *WebServiceResult functions to something like *GoogleSpellWebServiceResult. I ended up spending a lot of time trying to track that conflict down. The names sort of look like preset functions. More Soap feeds can be found for a lot of things at these urls: http://soapclient.com/uddi/uddi.sri?requestname=get_xmethods and http://www.xmethods.com/ Some other services that could be added with these reasonably simply: Weather, point to point distances (asked about on here), babelfish translation and a lot of other things. Some of the stuff on the lists above are not public accessible, some are pay, and you'll have to check thier individual homepage sometimes too tell. While searching around for this I also ran across a IP address > Location converter ('pinp') which is kind of fun to play with. Unlike some others I've seen it does more than just a whois. I modified GoogleSpell quick and dirtily so that it uses popups notifications instead of alerts too. It seems to work except you can't cut-and-paste from pop-ups so it doesn't work to put the corrected word in them alone well. Is that fixable? It seems like I read that the main toolbar had that problem before too. Heh heh, I guess I should have requested CVS write access a while ago but I think I'm done now. Thad Kerosky
<search function="pinp">
<COMMENT>
This search file was initially created by Dave's Quick Search Deskbar
Search Wizard version 0.5 (beta) on 08/25/02 at 00:39:15
Even though this XML search will probably load and is a healthy start
toward a completed search, please be aware that this search will probably
not work as is and will require some human inspection and modification.
</COMMENT>
<name>GeoPinpoint</name>
<category>Reference</category>
<contributor>Thad Kerosky</contributor>
<link>http://www.serviceobjects.com</link>
<description>
Get a Physical Location to an IP address.
</description>
<form name="pinpf"
method="get"
action="http://www.serviceobjects.com/products/GeoNet_demo.asp">
<input type="hidden" name="Action" value="Send"/>
<input type="hidden" name="IPAddress" value=""/>
</form>
<script><![CDATA[
function pinp(q)
{
if( nullArgs("pinp", q) )
return;
if( q == "" )
{
openSearchWindow("http://www.serviceobjects.com");
return;
}
// FORM variables for pinpf
// The wizard assigned the search string to this form field value because
// this field was the active element when the search file was generated.
// Change this to args.q if the search string is parsed with parseArgs.
document.pinpf.IPAddress.value = q;
submitForm(pinpf);
}
]]></script>
</search>
<search function="googlespell"> <name>Google Spellcheck</name> <description>Invoke Google webservice for spelling suggestion</description> <link>http://www.google.com/apis/</link> <category>Search the Web</category> <contributor>Glenn Carr</contributor> <form name="googlespellf"> <div id="googleWebService" name="googleWebService" style="behavior:url(addons\\googlespell\\webservice.htc)" onresult="onWebServiceResult()" /> </form> <script><![CDATA[ function googlespell(q) { if( nullArgs("googlespell", q) ) return false; if ( typeof googleLicenseKey == 'undefined' ) { alert( 'This requires a Google APIs license key. You can obtain one for free at http://www.google.com/apis/.\n' + 'Once you obtain a key, assign it to \'googleLicenseKey\' in your localprefs.js.'); return; } callWebService(q) } function initWebService() { try { document.all.googleWebService.useService("http://api.google.com/GoogleSearch.wsdl", "GoogleSearchService"); return true; } catch (ex) { alert("Web service failed to initialize. " + ex.description); return false; } } function callWebService(sSearch) { if (initWebService()) { var objCall = new Object(); objCall.funcName = "doSpellingSuggestion"; objCall.async = true; try { iCallID = document.all.googleWebService.GoogleSearchService.callService(objCall, googleLicenseKey, sSearch, 0, 10, true, "", false, "lang_en", "latin1", "latin1"); } catch (ex) { alert("Failed: " + ex.description); } } return false; } function onWebServiceResult() { if(event.result.error) { alert("Error executing web service. " + event.result.errorDetail.code + ", " + event.result.errorDetail.string + " " + event.result.errorDetail.raw); } else { var oDoc = event.result.raw; resultXml = oDoc.xml; var sSuggestedSpelling = oDoc.selectSingleNode("SOAP-ENV:Body/ns1:doSpellingSuggestionResponse/return").text; if ( sSuggestedSpelling != '' ) { var windowW = 350; var QSFPopup = window.createPopup(); var QSFPopupBody = QSFPopup.document.body; var QFSBodyCode = "<table id=qstable border=0 cellspacing=1 cellpadding=2 width=100% height=100%>"; QFSBodyCode += "<tr><td valign=top><style>" + convertStylesToInline() + "</style>"; QFSBodyCode += "<tr><td valign=top style='text-align: center' class=helpboxDescriptions><b>Google suggests:</b> "+ sSuggestedSpelling; QFSBodyCode += "</tr></td></table>"; QSFPopupBody.innerHTML = QFSBodyCode; QSFPopup.document.body.style.border="outset 2px"; QSFPopup.document.body.style.background='menu'; QSFPopup.document.body.style.overflowY='auto'; // Temporatily show the popup to determine the proper final // height for the popup. QSFPopup.show(0, 0, windowW, 0); var windowH = QSFPopupBody.scrollHeight + 6; QSFPopup.hide(); // Put a cap on the popup height windowH = windowH > window.screen.height-100 ? window.screen.height-100 : windowH; //QSFPopup.show(20, -20-windowH, windowW, windowH, document.body); QSFPopup.show((buttonalign == "left" ? 0 : document.body.clientWidth - windowW), -windowH, windowW, windowH, document.body); document.deff.q.value = sSuggestedSpelling; return true; } else { //document.deff.q.value = '[No suggestions found]'; // Define the popup's final width var windowW = 350; var QSFPopup = window.createPopup(); var QSFPopupBody = QSFPopup.document.body; var QFSBodyCode = "<table id=qstable border=0 cellspacing=1 cellpadding=2 width=100% height=100%>"; QFSBodyCode += "<tr><td valign=top><style>" + convertStylesToInline() + "</style>"; QFSBodyCode += "<tr><td valign=top style='text-align: center' class=helpboxDescriptions>Correct or Unrecognizable"; QFSBodyCode += "</tr></td></table>"; QSFPopupBody.innerHTML = QFSBodyCode; QSFPopup.document.body.style.border="outset 2px"; QSFPopup.document.body.style.background='menu'; QSFPopup.document.body.style.overflowY='auto'; // Temporatily show the popup to determine the proper final // height for the popup. QSFPopup.show(0, 0, windowW, 0); var windowH = QSFPopupBody.scrollHeight + 6; QSFPopup.hide(); // Put a cap on the popup height windowH = windowH > window.screen.height-100 ? window.screen.height-100 : windowH; //QSFPopup.show(20, -20-windowH, windowW, windowH, document.body); QSFPopup.show((buttonalign == "left" ? 0 : document.body.clientWidth - windowW), -windowH, windowW, windowH, document.body); return false; //alert( 'Google found no suggestions.' ); } document.deff.q.createTextRange().select(); } } ]]></script> </search>
dsqd_dictionarypop.zip
Description: Zip compressed data
