Last active
January 27, 2023 22:44
-
-
Save dennisstewart/ae54133e46755acd4e6a6cdb83809c9f to your computer and use it in GitHub Desktop.
Re-enables the password box on TreasuryDirect.gov so I can paste from my password manager
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 TreasuryDirect Copypasta | |
// @version 0.2 | |
// @description Allow creds to be pasted from a password manager into the TreasuryDirect login form. | |
// @author Dennis Stewart | |
// @license The Strong Style Public License https://raw.githubusercontent.com/dennisstewart/cvs-checker-py/main/LICENSE | |
// @match https://*.treasurydirect.gov/RS/PW-Display.do* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=treasurydirect.gov | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
document.querySelector("input[class='pwordinput']").removeAttribute("readonly"); | |
document.querySelector(".pwordinput").setAttribute("style", "background-color: initial !important"); | |
//thanks Jan Biniok(Tampermonkey dev) and Büchner Matthias (tutorial video maker - https://www.youtube.com/watch?v=hAeWOOJPp0o) | |
})(); |
The TreasuryDirect login page has removed the "www." and changed to:
https://treasurydirect.gov/RS/PW-Display.do
Just update the @match
part to make it work again, e.g.
// @match https://*.treasurydirect.gov/RS/PW-Display.do
Thanks @alanhoyle and @jhristu.
I've updated it to a more permissive match string (works regardless of subdomain or query strings, such as errors).
Also now changes the password text box's background color into whatever color is the user's default.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The TreasuryDirect login page has removed the "www." and changed to:
https://treasurydirect.gov/RS/PW-Display.do