Skip to content

Commit

Permalink
Update script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
maplehe7 committed Aug 15, 2024
1 parent 015898e commit c2feff0
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions cookieClicker/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ const app = initializeApp(firebaseConfig);
const auth = getAuth()
var button = document.getElementById("signup_button")
const analytics = getAnalytics(app);
button.addEventListener("click", async () => {
var email = document.getElementById("user")
var password = document.getElementById("password")
createUserWithEmailAndPassword(auth, email.value, password.value).then((userCredential)=>{
const user = userCredential.user;
window.location.href= "./lol.html";
})
.catch((error) => {
const errorCode = error.code;
const errorMessage = error.message;
alert(errorCode,errorMessage)
});
});
// button.addEventListener("click", async () => {
// var email = document.getElementById("user")
// var password = document.getElementById("password")
// createUserWithEmailAndPassword(auth, email.value, password.value).then((userCredential)=>{
// const user = userCredential.user;
// window.location.href= "./lol.html";
// })
// .catch((error) => {
// const errorCode = error.code;
// const errorMessage = error.message;
// alert(errorCode,errorMessage)
// });
// });
var login_button = document.getElementById("button")
login_button.addEventListener("click", async () => {
var email = document.getElementById("user")
Expand Down

0 comments on commit c2feff0

Please sign in to comment.