How Does it Work?
This extension has two parts
chrome.declarativeContent to detect password fields in the active tab. This check happens on tab load/update which means the extension will not detect password fields in dynamic apps. However, the
declarativeContent is significantly more straightforward to implement than accounting for the dynamic fields, which is why it is suitable for initial version of this application.
content script runs in the active tab if it contains password fields. On load it attaches listeners to know when password input is active. Then, on demand it checks typed character to know if it resulted from a key combination where caps lock was activated. If caps lock is detected to be on, the
content launches a HTML5 validation message to inform the user.