Auto Login

Keine Antworten
Beigetreten: 07/27/2007
Beiträge: 32
User offline. Last seen 2 years 17 weeks ago.

Buttons

You need to configure the button to add your own websites,username,password.
Now no need to install any external software to do this.

Issues :

  • The button will prompt you to wait for a sec.
Warning!
  • Passwords are insecure!

Auto Login
Compatibility: 

Minefield Firefox 3.0.* Firefox 2.0.* Firefox 1.5.* Flock

Author(s): 
deepakjoshi04
Description & info:

Button(s):

Behavior

Action Behavior

Left

Log in as site selected in the menu

Left

On Button Drop-Marker

Offer Menu to select site for login.

Revisionen

Revision Operations
03/04/2009 - 16:53 by rawny

Cleaned up description.

current revision
03/02/2009 - 12:56 by admin

update compatibility field

03/01/2009 - 17:14 by SCAdmin

Added Security warning

03/01/2009 - 17:10 by SCAdmin

Moved Post

Kürzel

javascript: Copy To Clipboard
/*Code*/

Init

javascript: Copy To Clipboard
var apps,srcUrl,MItem,mPop;
 
function onLoad(uname,pass)
{
alert("Please wait a sec..");
form_fill(uname,pass);
}
 
function loadPage(evt)
{
	var url=evt.target.value;
	var name=evt.target.name;
	var pass=evt.target.pass;
	gBrowser.selectedTab=gBrowser.addTab(url);
	function load(){
	     if (content.document.title.length>0)
	     {
		onLoad(name,pass);
	     } else {
		 setTimeout(load.bind(this),1000);
	     }
	};
	load();
}
 
function submit_form()
{
	submit_it(gBrowser.contentDocument.getElementsByTagName("BUTTON"));
	submit_it(gBrowser.contentDocument.getElementsByTagName("INPUT"));	
}
 
function submit_it(obj)
{
for(var i=0;i<obj.length;i++)
	{
		if(obj[i].type=="submit")
		{
			obj[i].click();
			break;
		}
		if(obj[i].type!="hidden" && (obj[i].type=="button"))
			{
				var n=obj[i].name.toLowerCase();
				var v=obj[i].value.toLowerCase();
		if(n.match("submit") || n.match("login") ||v.match("submit") ||v.match("login")||n.match("sign") ||v.match("sign"))
			{
				obj[i].click();
				break;
			}	
			}
	}
}
function form_fill(username,passwd)
{
	var obj= gBrowser.contentDocument.getElementsByTagName("INPUT");
	for(var i=0;i<obj.length;i++)
	{
		if(obj[i].type!="hidden")
		{
			if(obj[i].type=="text")
			{
				var n=obj[i].name.toLowerCase();
				if(n.match("name") || n.match("login")||n.match("mail"))
				obj[i].value=username;
			}
			if(obj[i].type=="password")
			obj[i].value=passwd;
 
		}
	}
submit_form();
}
 
function getIndex(opt,value)
{
	for( var i=0;i<opt.length;i++)
	{
		if(opt[i].text==value)
		return i;
	}
}
 
//------menu items--------
var Img=this.image;
apps=new Array;
apps.push(['Yahoo','http://www.yahoomail.com','username','pass',Img]);
apps.push(['Gmail','http://www.gmail.com','username','pass',Img]);
apps.push(['Rediff','http://www.rediffmail.com','username','pass',Img]);
apps.push(['separator']);
 
 
 
 
//------/menu items-------
 
MItem=function(value){
  var mItem=document.createElement('menuitem');
  mItem.setAttribute('label',apps[value] [0]);
  mItem.value = apps[value] [1];
  mItem.name= apps[value] [2];
  mItem.pass= apps[value] [3];
  mItem.tooltipText = apps[value] [0];
  mItem.setAttribute('class','menuitem-iconic bookmark-item');
 mItem.setAttribute('image',apps[value] [1]);
  return mItem;
}
 
 
 
//this.orient="vertical";
mPop=document.createElement('menupopup');
for (var i=0;i<apps.length;i++){
 if (apps[i] =='separator'){
  mPop.appendChild(document.createElement('menuseparator'));
 }else{
  mPop.appendChild(MItem(i));
 }
}
 
this.siteGo=function(evt)
{
loadPage(evt);
}
 
 
 
this.appendChild(mPop);
this.type = "menu-button";
this.tooltipText=this.label;
this.setAttribute("oncommand", "this.siteGo(event);");
this.value="http://yahoomail.com";
this.name="username";
this.pass="pass";
 
/*---------------------- Show Focus Block Start ------------------------*/
 
this.style.opacity = '.65';
this.setAttribute('onmouseover', 'custombuttons.ButtonBrt(event);' );
this.setAttribute('onmouseout', 'custombuttons.ButtonDim(event);' );
 
/*----------------------- Show Focus Block End -------------------------*/
/*--------------- Custom Buttons2 Attributes Block Start ----------------*/
this.setAttribute('author','deepakjoshi04');
this.setAttribute('version','null');
this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/auto-login.html');
this.setAttribute('dependency','null');
this.setAttribute('status','null');
this.setAttribute('public',true);
this.setAttribute('help','0,null');
// this.tooltipText += '';
 
/*---------------- Custom Buttons2 Attributes Block End -----------------*/

Help

Field Empty

Details

Button Categories: