Skip to content

Commit 53e9ff2

Browse files
Kirbogdbongiovimatthew-microsoft
authored andcommitted
ShowPasswordButton (#25)
* Initial ShowPasswordButton project * clean up done Code layout is easier to read, images moved to subfolder, readme contains view of changes * clean up done Code layout is easier to read, images moved to subfolder, readme contains view of changes
1 parent da382c1 commit 53e9ff2

4 files changed

Lines changed: 36 additions & 0 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
var inputArea = document.getElementById("inputArea");
2+
3+
if(inputArea){
4+
console.log("hello");
5+
var showButton = document.createElement("div");
6+
showButton.id = "showButton";
7+
showButton.innerHTML = "Show password";
8+
inputArea.appendChild(showButton);
9+
10+
var appendedButton = document.getElementById("showButton");
11+
appendedButton.onmousedown = function(){ document.getElementById("password").type = "text"; };
12+
13+
appendedButton.onmouseup = function(){ document.getElementById("password").type = "password";};
14+
15+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# ShowPasswordButton
2+
3+
## Overview
4+
5+
This project contains an OnLoad.js script for adding "Show Password" batton in password field on ADFS logon page.
6+
Works with password fields on Form based auth and with custom provider using domain password as secondary auth.
7+
8+
## Applying the customization
9+
10+
To add "Show password" button do the following:
11+
12+
1. Add the code from Project Onload.js to your webtheme Onload.js
13+
14+
2. Apply the customization according to https://docs.microsoft.com/en-us/windows-server/identity/ad-fs/operations/advanced-customization-of-ad-fs-sign-in-pages
15+
16+
### Example
17+
![Button added](/communityCustomizations/ShowPasswordButton/images/Customization1.png)
18+
![Password shown on mouse click](/communityCustomizations/ShowPasswordButton/images/Customization2.png)
19+
20+
### Special thanks to Matthew Bongiovi for sharing the code
21+
36.2 KB
Loading
33.6 KB
Loading

0 commit comments

Comments
 (0)