1/** 2 * ãã¹ã¯ã¼ããªã»ãããã©ã¼ã 3 * èªå·±å®çµå: turbo:loadã§èªååæå 4 * 5 * Note: Firebase CDN (compat mode) ã¯ã°ãã¼ãã«å¤æ° window.firebase ãæä¾ãã¾ã 6 */ 7var Auth = Auth || window.Auth || {}; 8 9(function() { 10 /** 11 * ãã¹ã¯ã¼ããªã»ãããã©ã¼ã ãåæå 12 */ 13 function initPasswordResetForm() { 14 const passwordResetButton = document.getElementById('js-user-password-reset-button'); 15 if (!passwordResetButton) return; 16 17 // Firebaseåæå 18 if (!Auth.FirebaseUtil.initFirebase()) { 19 console.error('Firebase initialization failed'); 20 return; 21 } 22 23 // ã¤ãã³ããªã¹ãã¼ç»é² 24 passwordResetButton.addEventListener('click', function(e) { 25 e.preventDefault(); 26 sendPasswordResetEmail(); 27 }); 28 } 29 30 /** 31 * ãã¹ã¯ã¼ããªã»ããã¡ã¼ã«ãéä¿¡ 32 */ 33 function sendPasswordResetEmail() { 34 const emailField = document.querySelector("input[name='email']"); 35 if (!emailField) return; 36 37 const email = emailField.value; 38 39 if (!email) { 40 Auth.FormHelper.clearErrorMessages(); 41 Auth.FormHelper.showErrorMessage("ã¡ã¼ã«ã¢ãã¬ã¹ãå ¥åãã¦ãã ãã"); 42 return; 43 } 44 45 // Firebase CDN (compat mode) ã®ã°ãã¼ãã«å¤æ°ãä½¿ç¨ 46 const actionCodeSettings = null; 47 firebase.auth().sendPasswordResetEmail(email, actionCodeSettings) 48 .then(function() { 49 window.location.href = "/sent_password_resets"; 50 }) 51 .catch(function(error) { 52 const errorMessage = Auth.FirebaseUtil.getFirebaseErrorMessage(error.code); 53 Auth.FormHelper.clearErrorMessages(); 54 Auth.FormHelper.showErrorMessage(errorMessage); 55 }); 56 } 57 58 // turbo:load ã§èªååæå 59 document.addEventListener('turbo:load', initPasswordResetForm); 60})(); 61 62window.Auth = Auth;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.