Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// ==UserScript==
// @name Remember Password for Sleipnir
// @author yuuAn
// @include *
// @description Makes autocomplete always on
// @description:ja ブラウザのパスワード保存機能が効かないサイトでも強制的に保存できるようにします
// @icon iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAD5UlEQVR4nO3c4YsUZQDH8e+VniVWqIFwXXISJAeJWhgYvqgUC3xhvUiIkqAg0jelWBeIIfSi/oE6qBdOkUihFL0RFKQiiBCsDEGsXgSBYCVWZ1Ccri+eZ9nZnb1jx91xbne+H3jg9rln5pl59rczs7MzA5IkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSc2GgTFgA7BpQMqGuE7DPRulAbQROAJcBmoDWqaAw8CjPRqzgbAE+JTy35wbXY4Ai3swfn1tOfAL5b8ZZZWfgbu7HsU+tRD4nvLfhLLLKeDWLseyL00w84BMANuBpwakbI/rdGqGdX61y7HsO8PAH2QHYh8wVOJyFW0IeIPsev8OzC9xuW64x8kOwoelLlF764D9sWzt4XwPkl3/zT2c/5zX7lOwstQlam8njeU70MP5jtN+61cZkzSv/OVyF2dGRQUAsuc7Jns8/zktIbsPnIuKDMAFmsfggx7Pf05LMAAGAANgADAABoDOArAFOAOMpuq+Bl4G5uXoewz4hOaTLxOxrvW0rAEoSEK+AOxNtd0V6+5P1X3eYb+rgL9onHGsOxPrLgIrUvUGoCAJ+QKwlPDDSY3w+wHAO/H1FLAmR9/vpvpdBTyUev1mS1sDUJCE/LuAcRqf3geBS8AV4Mmcfc8HTsT5vAW8F/8+RPY0tAEoSEJnAVgNPE/4pN4MbAOuAj/E6fbHdivi/56Ypc89wMPAbcAy4NdYLhK2KouAOwgXa9SPDwxAQRI6C8DTqTb/AF8A52mcPTwap+3kTZqObaaBH4GTqem+As4SwlUjbFnAABQmIX8ApoFzNAZuCjgN/Ee+ANTiPM6mXp8G/ky9NgAFS+gsAOPAM8Ba4BbCdYP/A9/F6V4gfAW8l3As8Ngsfb4EPALcCdxO2Ar8RNiyHCMcGywj7AJ2xGkMQEES8h8Ergb+JnyS7yHsu6/nIHAB8GXs9zXg/fj3x8BNLW0NQEES8gVgFPgttj0W6+pf5/4F1ufo+wCNXcoIzV8D325pawAKknD9J4Kei3XrU3WfddjvfYRNfg04HuuGCLuCGuE4YCzV3gAUJCH/LmAT8C3h61rdCUIgWjfdsxkBPgKeTdW9TjixtLSlrQEoSEL+AJTBABQkwQAYAAyAAcAAVDIAXhRa8YtCvSw8u/6VuizcG0Oy61+pG0O8Nay5XKBit4YB7CY7EDUaN4e+OGBltptDX+lyLPvSAsKZvXYDUqXyDRV+dMwoPiDirq5Hsc/5iBgBPiRKUf0xcQ8MWBmjwvt6SZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZLU3jVd7iJfrug7pwAAAABJRU5ErkJggg==
// @version 0.1.2
// @history:ja 0.1.2 hidden に設定された input タグには適用しないようにしました
// ==/UserScript==
(function() {
var form = document.getElementsByTagName('form');
if (form) {
for (i = 0; i < form.length; i++) {
form[i].setAttribute('autocomplete', 'on');
}
var input = document.getElementsByTagName('input');
for (i = 0; i < input.length; i++) {
if (input[i].type == 'text' || input[i].type == 'password') {
if (input[i].currentStyle.visibility != 'hidden') {
input[i].setAttribute('autocomplete', 'on');
}
}
}
}
})();
@yuuan

This comment has been minimized.

Copy link
Owner Author

commented Jan 4, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.