Loading...
网友提供的内容

make Google Account Multi-Login script work for Firefox 3.5

升级到firefox 3.5之后,Google Account Multi-Login 就不能切换用户了。去主页看了一下,也没有新版本可以更新。

检查了一下脚本,发现自第83行开始的这几行出了问题


this.parentNode.Email.value = un;
...

 

貌似firefox 3.5那备受好评的新Javascript引擎没办法识别form.field_name这种用法。Firebug的错误提示显示:this.parentNode.Email is undefined

于是做了一点修改,你可以直接点这里安装修改过的版本:install Google Account Multi-Login script for Firefox 3.5

如果你要自己动手的话,首先你需要打开google_account_multi-log.user.js文件,它的位置是
C:\\Documents and Settings\\{windows user name}\\Application Data\\Mozilla\\Firefox\\Profiles\\{firefox profile name}.default\\gm_scripts\\google_account_multi-log
注意,{}部分需要替换成你自己的用户名。


replace Line 176


   selectBox.innerHTML = \'<form name="gmLoginForm" action="https://www.google.com/accounts/ServiceLoginAuth" method="post" style="display:inline;"><select style="font-family:arial,san-serif; font-size:7pt; padding:0px; height:16px;" name="gmSelectLogin"><option>Change User...</option><option disabled="disabled">&#8212;&#8212;</option>\' + makeUserList(\'<option>\', \'</option>\', false) + \'<option disabled="disabled">&#8212;&#8212;</option><option>Add Account...</option><option>Remove Account...</option><option>Sign Out</option></select><input type = "hidden" name="continue" value="\' + ((document.domain.indexOf("mail.google") != -1)?"https://mail.google.com/mail/?nsr=1":document.location.href.split("#")[0]) + \'" /><input type="hidden" name="PersistentCookie" /><input type="hidden" name="Email" /><input type="hidden" name="Passwd" /><input type="hidden" name="service" value="\' + getService() + \'" /></form>\';

 

with

   selectBox.innerHTML = \'<form name="gmLoginForm" action="https://www.google.com/accounts/ServiceLoginAuth" method="post" style="display:inline;"><select style="font-family:arial,san-serif; font-size:7pt; padding:0px; height:16px;" name="gmSelectLogin"><option>Change User...</option><option disabled="disabled">&#8212;&#8212;</option>\' + makeUserList(\'<option>\', \'</option>\', false) + \'<option disabled="disabled">&#8212;&#8212;</option><option>Add Account...</option><option>Remove Account...</option><option>Sign Out</option></select><input type = "hidden" name="continue" value="\' + ((document.domain.indexOf("mail.google") != -1)?"https://mail.google.com/mail/?nsr=1":document.location.href.split("#")[0]) + \'" /><input type="hidden" id="gaml_PersistentCookie" name="PersistentCookie" /><input type="hidden" id="gaml_Email" name="Email" /><input type="hidden" id="gaml_Passwd" name="Passwd" /><input type="hidden" name="service" value="\' + getService() + \'" /></form>\';

 

replace Line 82-84


this.parentNode.Email.value = un;
this.parentNode.Passwd.value = pw;
this.parentNode.PersistentCookie.value = al;

 

with

document.getElementById(\'gaml_Email\').value = un;
document.getElementById(\'gaml_Passwd\').value = pw;
document.getElementById(\'gaml_PersistentCookie\').value = al;

 

站内评论

  • 暂无评论
昵称: 不能为空
E-mail: email不会被泄露 email格式不正确
评论: 评论不能为空