Last active
April 21, 2018 05:38
-
-
Save mikedfunk/43b0778563b19a946444f63f60734ab6 to your computer and use it in GitHub Desktop.
Couchbase userscript
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 Couchbase authentication fix | |
// @description Fixes couchbase's inability to save password. | |
// @include http://couch.local.*.com/ui/index.html* | |
// @include http://couch*.*.aws.*.com:*/ui/index.html* | |
// @version 1.0 | |
// ==/UserScript== | |
function fixAutoComplete () { | |
setTimeout(function () { | |
var passwordElement = document.querySelectorAll('input[type="password"]')[1]; | |
passwordElement.removeAttribute('readonly'); | |
passwordElement.removeAttribute('disabled'); | |
passwordElement.removeAttribute('mn-autocomplete-off'); | |
passwordElement.removeAttribute('autocomplete'); | |
console.log('Fixed couchbase autocomplete'); | |
}, 1000); | |
} | |
var script = document.createElement('script'); | |
script.appendChild(document.createTextNode('('+ fixAutoComplete +')();')); | |
(document.body || document.head || document.documentElement).appendChild(script); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment