-
-
Save frispete/14e8b3fc8ca6fe607724b1b94972aeca to your computer and use it in GitHub Desktop.
Greasymonkey/Tampermonkey script that strips "autocomplete" attributes from username and password fields
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Enable autocomplete attributes | |
// @namespace frispete | |
// @version 0.1 | |
// @description This plugin gives the control about your passwords back to your browser and allows the browser to store every password. | |
// @include http://* | |
// @include https://* | |
// @copyright 2014, David, 2021, frispete | |
// forked from: https://gist.github.com/david0/9327296 | |
// Usage: Install TamperMonkey, load this page and push raw view of script | |
// ==/UserScript== | |
function enableAutocomplete(element) { | |
if element.hasAttribute("autocomplete") | |
element.setAttribute("autocomplete", "on"); | |
} | |
var forms = document.getElementsByTagName('form'); | |
for (var i=0; i<forms.length; i++) | |
enableAutocomplete(forms[i]); | |
var inputElements = document.getElementsByTagName('input'); | |
for (var i=0; i<inputElements.length; i++) | |
enableAutocomplete(inputElements[i]); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment