Thread viewer for Bluesky

trim whitespace from login/password fields

Changed files
+8 -5
+8 -5
skythread.js
··· 190 190 } 191 191 192 192 function submitLogin() { 193 - let handle = $id('login_handle', HTMLInputElement); 194 - let password = $id('login_password', HTMLInputElement); 193 + let handleField = $id('login_handle', HTMLInputElement); 194 + let passwordField = $id('login_password', HTMLInputElement); 195 195 let submit = $id('login_submit'); 196 196 let cloudy = $id('cloudy'); 197 197 198 198 if (submit.style.display == 'none') { return } 199 199 200 - handle.blur(); 201 - password.blur(); 200 + handleField.blur(); 201 + passwordField.blur(); 202 202 203 203 submit.style.display = 'none'; 204 204 cloudy.style.display = 'inline-block'; 205 205 206 - logIn(handle.value, password.value).then((pds) => { 206 + let handle = handleField.value.trim(); 207 + let password = passwordField.value.trim(); 208 + 209 + logIn(handle, password).then((pds) => { 207 210 window.api = pds; 208 211 window.accountAPI = pds; 209 212