Hello all,
I'm attaching a nifty new search that does some great stuff for
working with Yahoo!, but also demonstrates storing 'profiles' for
different search capabilities using single Array variables in the
localprefs.js file.
[Description]:
Login to My Yahoo! (or other Yahoo! umbrella sites) using a
user/password combination profile.
[Usage]:
yy [profile]
[Variables]:
//An array storing a user and password profile for Yahoo!
var yyid = Array("username","password");
//You SHOULD provide the yyid() variable, however, you may also
//provide as many other profiles as necessary to account for your
//Yahoo ID's. If you were to create a 'second' profile you would
//need only to pass the variable name on the command line:
// yy profile2
//These variables are, however, case sensitive. If the variable
//passed does not exist (misspelled, incorrect case...), this
//search will 'default' to using the <em>yyid</em> variable.
var profile1 = Array("myid","pass","http://mail.yahoo.com/");
var profile2 = Array("otherid","opass","http://groups.yahoo.com/");
[Examples]:
yy
yy profile1
yy profile2
[Advanced]:
One of the best parts is that you can create Aliases that include
the profile variable name very easily, so going to a site using one
profile is at least as easy as using a second or other profile.
Regards,
Shawn K. Hall
http://ReliableAnswers.com/
'// ========================================================
"The best time to hold your tongue is the time you feel
you must say something or bust."
-- Josh Billings
<search function="yy">
<name>My Yahoo!</name>
<category>News</category>
<contributor>Shawn K. Hall</contributor>
<email>[EMAIL PROTECTED]</email>
<description>Login to My Yahoo
<div class="helpboxDescLabels">Example:</div>
<table class="helpboxDescTable">
<tr><td>yy</td></tr>
<tr><td>yy myid</td></tr>
<tr><td>yy myotherid</td></tr>
</table>
<div class="helpboxDescLabels">Variables:</div>
<table class="helpboxDescTable">
<tr><td>yyid('user','pwd');</td><td>An array storing a user and password profile for Yahoo!
You SHOULD provide the <em>yyid()</em> variable, however, you may also provide as many other
profiles as necessary to account for your Yahoo ID's. If you were to create a 'second' profile
you would need only to pass the variable name on the command line: <br />
<strong>yy otherVariable</strong><br />
These variables are, however, case sensitive. If the variable passed does not exist (misspelled,
incorrect case...), this search will 'default' to using the <em>yyid</em> variable.</td></tr>
</table>
</description>
<link>http://my.yahoo.com/</link>
<comment>
This is pretty spiffy, eh?
</comment>
<form name="yyf" method="post"
action="http://login.yahoo.com/config/login"
oldonsubmit="return alert(document.forms['yyf'].login.value)">
<input type="hidden" name=".tries" value="1" />
<input type="hidden" name=".src" value="ym" />
<input type="hidden" name=".md5" value="" />
<input type="hidden" name=".hash" value="" />
<input type="hidden" name=".js" value="" />
<input type="hidden" name=".last" value="2" />
<input type="hidden" name="promo" value="" />
<input type="hidden" name=".intl" value="us" />
<input type="hidden" name=".bypass" value="" />
<input type="hidden" name=".partner" value="" />
<input type="hidden" name=".v" value="0" />
<input type="hidden" name=".yplus" value="" />
<input type="hidden" name=".emailCode" value="" />
<input type="hidden" name="plg" value="" />
<input type="hidden" name="stepid" value="" />
<input type="hidden" name=".ev" value="" />
<input type="hidden" name="hasMsgr" value="0" />
<input type="hidden" name=".chkP" value="Y" />
<input type="hidden" name=".done" value="http://my.yahoo.com" />
<input type="hidden" id="login" name="login" size="17" value="" />
<input type="hidden" name="passwd" id="passwd" size="17" maxlength="32" />
<input type="hidden" name=".save" value="Sign In" />
</form>
<script><![CDATA[
function yy(q){
if (q=="?"){
nullArgs("yy",q);
return false;
}
var yyids = yyid;
try{
eval("var yyids = " + q + ";");
}catch(e){
var yyids = yyid;
}
try{
document.yyf.login.value = yyids[0];
document.yyf.passwd.value = yyids[1];
if (yyids.length>2){
document.yyf['.done'].value = yyids[2];
}
}catch(e){}
submitForm(yyf);
}
]]></script>
<copyright>
Copyright (c) 2003 Shawn K. Hall
Distributed under the terms of the GNU Public License, Version 2 (http://www.gnu.org/copyleft/gpl.txt)
</copyright>
</search>