为什么AutoComplete不能在Firefox中始终运行?

If you’re the type of person that always allows Firefox to save your login credentials for the sites you visit, you might be very frustrated when you come across a site that doesn’t even prompt you to save the credentials. We’ve got the lowdown on what’s going on here.

如果您是始终允许Firefox为您访问的网站保存登录凭据的人员,那么当您遇到一个甚至没有提示您保存凭据的站点时,您可能会感到非常沮丧。 我们对这里发生的事情感到失望。

Here’s that awful form I have to type into almost every day… I’m really getting tired of it.

这几乎是我每天都要键入的可怕表格……我真的对它感到厌倦。

image

So I take a look into the source for the page, and here’s the culprit: the AUTOCOMPLETE=”off” on the form will tell Firefox to disable auto completing for that form. The form elements themselves also have the same tag on them.

因此,我看了看页面的源代码,这是罪魁祸首:表单上的AUTOCOMPLETE =“ off”将告诉Firefox禁用该表单的自动完成功能。 表单元素本身也具有相同的标签。

image

You’ll find this happens quite often on corporate vpns, banks, and other sites where they are worried about security and don’t want you to save your passwords, so they use this tag in their pages to prevent your browser from saving the credentials.

您会发现这种情况经常发生在企业vpn,银行和其他担心安全性并且不希望您保存密码的站点上,因此他们在页面中使用此标记来防止您的浏览器保存凭据。

Your Best Option: Greasemonkey it!

您最好的选择:Greasemonkey!

You can use a greasemonkey script to re-enable the autocomplete on the form elements. You can find a number of them at userscripts.org:

您可以使用lublessmonkey脚本在表单元素上重新启用自动完成功能。 您可以在userscripts.org上找到其中的一些:

http://userscripts-mirror.org/

http://userscripts-mirror.org/

Or you can write your own if you feel like it… for some reason the other scripts did not work on my screwy corporate vpn at work, so I created a new script that manually set the attributes of each.

或者,您也可以编写自己的脚本……由于某种原因,其他脚本无法在我工作的繁琐公司vpn上运行,因此我创建了一个新脚本来手动设置每个脚本的属性。

var frm = document.forms[0]; frm.setAttribute(‘autocomplete’, ‘on’); frm.elements[0].setAttribute(‘autocomplete’, ‘on’); frm.elements[1].setAttribute(‘autocomplete’, ‘on’);

var frm = document.forms [0]; frm.setAttribute('autocomplete','on'); frm.elements [0] .setAttribute('autocomplete','on'); frm.elements [1] .setAttribute('autocomplete','on');

Hint: the Firebug extension is a great way to figure out what the elements are if you are writing a script.

提示: Firebug扩展是在编写脚本时弄清楚元素是什么的好方法。

翻译自: https://www.howtogeek.com/howto/internet/firefox/why-doesnt-autocomplete-always-work-in-firefox/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值