Copied code from test page to quietPassword.js