<link crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" rel="stylesheet"> <style> #postBody button { font-size: 12px !important; } .list-group-item, .card { background: #222 !important; color: white !important; } </style> <script crossorigin="anonymous" defer="defer" integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz" src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script> <style> .hot-items-buttons { display: none; } #form input { all: unset; background: black; color: white; padding: 5px; padding-left: 10px; margin: 5px; font-size: 16px; border-radius: 5px; width: 70%; } #form input:focus, #form button:focus { border: 1px solid white; } div.pInf, div.brdCmb, h1.pTtl { display: none; } </style> <form style='display: none; margin-left: 17%; margin-top: 20px;' id='form' action='javascript:processForm()'> <h2>Login</h2> <small>Email</small><br> <input required type="email" id="email" placeholder="Email Address" /><br> <small>Password</small><br> <input required minlength="3" type="password" id="password" placeholder="Create Password" /><br> <h4 id='logs'></h4><br> <button id='btn_submit' class="btn btn-outline-info" type="submit" value="Submit"> Login </button><button class='btn btn-outline-light' style='margin-left: 5px;' class="button ln" type='reset' onclick='window.location.href = "https://storehaccounts.blogspot.com/p/create-account.html"'>Create account</button> </form> <script> window.addEventListener('load', async function () { await initFunctions(['FirebaseModule', 'PTC_Cookies', 'JBLOBFunctions']); if (!PTC_Cookies.checkIfCookiesSupported() || !PTC_Cookies.checkIfStorageSupported()) window.alert('Please turn on the cookies in your browser!'); else { let user_data = PTC_Cookies.getLocalStorage('ptc_user'); if (user_data == null) { console.log('not logged in.'); query('form').style.display = 'block'; } else { window.location.href = 'https://storehaccounts.blogspot.com/p/your-account-page.html?' + user_data.user; console.log('already logged in.'); } } }, false); // variables let firebase_users = 'aHR0cHM6Ly9zdG9yZWhhY2NvdW50cy13ZWJzaXRlLWRlZmF1bHQtcnRkYi5maXJlYmFzZWlvLmNvbS9wdGNfdXNlcnMuanNvbg=='; function disableForm(status) { if (status) query('form').style.pointerEvents = 'none'; else query('form').style.pointerEvents = 'auto'; } function query(str) { return document.querySelector('#' + str); } async function processForm() { // get all the users_list, check whether the typed email exists. let user_records = await FirebaseModule.get(atob(firebase_users)); user_records = JSON.parse(user_records); user_records = Object.entries(user_records); let isNoEmailFound = false; for(i=0; i<user_records.length; i++) { if(user_records[i][1].e == query('email').value) { isNoEmailFound = true; let blob_id = user_records[i][1].i; let temp_data = { "user": blob_id }; let user_data = await JBLOBFunctions.getBlobRecordSync('https://jsonblob.com/api/jsonBlob/' + blob_id, null); user_data = JSON.parse(user_data); if(user_data.password == query('password').value) { PTC_Cookies.storeLocalStorage('ptc_user', JSON.stringify(temp_data)); query('logs').innerText = 'Successful loggedin!'; window.location.href = 'https://storehaccounts.blogspot.com/p/your-account-page.html?' + blob_id; } else { query('logs').innerText = 'Invalid password. Please try again.'; } break; } } if(!isNoEmailFound) query('logs').innerText = 'No such emails registered in the server. Please create account now.'; } </script>