-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathokta-unjammer.user.js
40 lines (30 loc) · 1.08 KB
/
okta-unjammer.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// ==UserScript==
// @name Okta Password Jammer unJammer
// @version 1.2020.12.08.2
// @grant none
// @description Removes the hidden form fields that mess up browser password saving
// @downloadURL https://github.com/dnelson-1901/greasemonkey-scripts/raw/master/okta-unjammer.user.js
// @include https://*.okta.com/*
// @run-at document-end
// ==/UserScript==
// https://devforum.okta.com/t/firefox-asking-to-update-wrong-test-password-because-of-hidden-fields/10251/2
function fixup()
{
console.log("Callback!");
var nodes = document.querySelectorAll("input[id^=okta_hidden_pass_]");
console.log("Found "+nodes.length+" fields");
var removed = 0;
for (n of nodes)
{
n.remove();
removed++;
}
console.log("Removed "+removed+" hidden password fields");
}
// The fields are added via javascript, so try a couple of times to remove
// them.
document.addEventListener ("DOMContentLoaded",fixup);
window.addEventListener('load', fixup);
window.setTimeout(fixup, 1000);
window.setTimeout(fixup, 2000);
window.requestIdleCallback(fixup, { timeout: 1000 });