<link href='https://rawcdn.githack.com/ptcreborn/storehaccounts/10e0bca516fc851d379db5c2949bfb29985f3dea/tinyMCE.css' rel='stylesheet' type='text/css'/> <script defer='defer' referrerpolicy='origin' src='https://cdn.tiny.cloud/1/o5qu1o2naca2z6sbvhvmk99zkszzkl1g66h4wkg2riy4zlz9/tinymce/7/tinymce.min.js'></script> <script defer='defer' src='https://rawcdn.githack.com/ptcreborn/storehaccounts/1990ad1e1455c52ad97d95f71e5ca7530f3c408c/tinyMCE_Editor.js'></script> <style> .parent-container { background: #2D3844; padding: 8px 16px 8px 16px; min-width: 270px; line-height: 1.2rem; max-width: 800px; opacity: 0.9; } .tox.tox-silver-sink.tox-tinymce-aux { display: none; } div.instructions { font-weight: 500; opacity: 0.6; font-style: italic; margin-bottom: 5px; } div.title-settings { display: block; font-size: 16px; font-weight: 600 !important; margin-bottom: 5px; border-bottom: 1px solid white; margin-top: 5px; } div.warning { color: orange !important; font-weight: 700; } div.error { color: #f44336 !important; font-weight: 700; } div.success { color: #A4F644 !important; font-weight: 700; } div.instructions-headings { font-weight: 500; opacity: 0.6; margin-bottom: 10px; } .tbox-container { display: block; margin-bottom: 10px; } .tbox-container img.profile-img { width: 150px !important; height: 150px !important; object-fit: cover; border: 1px solid white; } .tbox-container img.wallpaper { width: 100% !important; height: 200px !important; object-fit: cover; border: 1px solid white; } .tbox-container span { line-height: 1.2rem; font-weight: 600; } .tbox-container button { padding: 0 5px 0 5px; color: black; } .tbox-container input { display: block; min-width: 150px; max-width: 300px; width: 200px; background: #2D3844; color: white; } div.tbox-container textarea { all: unset; background: #2D3844; color: white; border-radius: 10px; padding: 5px; width: 100%; max-width: 500px; font-weight: 600; } div.left { margin-left: 20px; } h1.pTtl.aTtl.sml.itm { display: none !important; } </style> <div class='parent-container'> <form action='javascript:savePersonalInformations()'> <div class='title-settings'>Settings</div> <div class='instructions-headings'>This is the settings where you can edit your basic information including the nickname, password, profile picture, background image (wallpaper) and more.</div> <div class='title-settings'>Personal Informations</div> <div class='instructions-headings'>Modify and change the public informations about you which is publicly shown in your acitivies and profile page.</div> <div class='tbox-container left'> <span>Nickname</span> <br> <div class='instructions'>This serve as your public display name where they will see this in your comments, profile page and posts.</div> <div class='instructions warning'>(At least 7 characters!)</div> <input required minlength="7" id='se_nickname'/> </div> <div class='tbox-container left'> <span>About Me</span> <br> <div class='instructions'>This describes who you are, what are your talents and abilites. What do you do and your status in life.)</div> <div class='instructions warning'>(At least 30 characters!</div> <textarea required minlength="30" rows="5" id='se_aboutme'></textarea> </div> <div class='tbox-container left'> <span>Country (fixed)</span> <br> <div class='instructions'>Country is automatically detected on the time you have signed up and hence will not be able to change.</div> <div id='se_country'></div> </div> <div class='tbox-container left'> <span>Profile Image</span> <br> <div class='instructions'>This is your public profile image where it will be shown in your activities such as posting thread, commenting, replying and even on your profile page.</div> <img class="profile-img" id="se_profile" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3IhQqzIvGtbQBFFmEhVVJMV9EJUrN3-CLPbUkMcZw-kwHQtc1v8-rYVFkhLcVmbcp2ePPxiXaproO4rBbLqP2iRpIRIwBp2_sh6k-TsOFMjqVvtCzGgayedlGoY5WpvYMuUDZ4qYlVbDM3O32vsXqzmJaIRw1xjKQab0JWDf-HNqCbeIlhBhoQpxsM-Fh/s16000-rw/20240523124029.png"/> <br> <div class='instructions'>Change your profile picture.</div> <div id='profile_status' class='instructions warning'>Status Upload: </div> <input id="file_profile" type="file" accept="image/png, image/gif, image/jpeg, image/bmp" placeholder="Change Profile Picture" /> </div> <div class='tbox-container left'> <span>Wallpaper</span> <br> <div class='instructions'>This will serve as the wallpaper of the website and your audience will see this when they visited your profile.</div> <img class="wallpaper" id="se_background" src="https://images.rawpixel.com/image_800/cHJpdmF0ZS9sci9pbWFnZXMvd2Vic2l0ZS8yMDIzLTEwL3Jhd3BpeGVsX29mZmljZV8yOF9waG90b19vZl9vYWtfdHJlZV9sZWF2ZXNfaW5fYXV0dW1uLV9zdW5ueV9nb181OTk3NzJmMC1lZGU4LTQxZmQtYWUyYi1lOTFhZTRmYzZjMGUtYl8xLmpwZw.jpg"/> <br> <div class='instructions'>Change your background picture or wallpaper.</div> <div id='background_status' class='instructions warning'>Status Upload: </div> <input id="file_background" type="file" accept="image/png, image/gif, image/jpeg, image/bmp" placeholder="Change Profile Picture" /> <br> <div id='personal_status' class='instructions error'>Status: </div> <div class='instructions warning'>All the data changes above will be save once you click the save button below.</div> <button>Save Personal Settings</button> </div> </form> <form action='javascript:saveSecurity();'> <div class='title-settings'>Security</div> <div class='instructions-headings'>This section provides your password and other confidential information.</div> <div class='tbox-container left'> <span>Password</span> <div class='instructions'>To change your password, kindly type in your new password as it shows below your previous password.</div> <div class='instructions'>Old Password</div> <input id='se_oldpassword' value='qwerty12345' disabled='disabled'/> <div class='instructions'>New Password</div> <input required minlength="5" id='se_newpassword'/> <div class='instructions'>Retype Password</div> <input required minlength="5" id='se_retypepassword'/> <br> <div class='instructions error' id='password_status'>Status: </div> <div class='instructions warning'>Your password will be changed once you click the button below.</div> <button type='submit'>Confirm Change Password</button> </div> </form> <form action='javascript:saveSignature();'> <div class='title-settings'>Signature</div> <div class='instructions-headings'>Signature usually will show after the content of your activities such as comments, replies or thread post.</div> <div class='tbox-container left'> <div class='instructions warning'>(At least 15 words!)</div> <textarea id="se_signature"><div style="display: block; text-align: center;"><img src="https://pbs.twimg.com/profile_images/1240794620726042630/jvZqNXjI_400x400.jpg"/></div></textarea> <br> <div id='signature_status' class='instructions error'>Status: </div> <div class='instructions warning'>Your signature will be save once you click the save button below.</div> <button id='editor-save-button' type='submit'>Save Signature</button> </div> </form> <br> <div class='title-settings'>Save All Changes</div> <div class='tbox-container left'> <div class='instructions-headings'>If you are already finish saving and editing your account information, please click the button "Save All" below to apply it to your account. The changes will apply effectively to your account once saved.</div> <button onclick='javascript:updateAccountBlob();'>Save All Changes to my Account.</button> </div> </div> <script> window.addEventListener('load', async function() { await initFunctions(['FirebaseModule', 'tinyMCE_Editor', 'FLAG_API', 'JBLOBFunctions']); tinyMCE_Editor.setupEditor('se_signature'); FLAG_API.getCodefromIP(document.querySelector('#se_country')); if(await getUserContent()) { loadUserData(); } else { // redirect to create account window.alert('your process will not continue!'); } }, false); let se_userjson; let se_userid; let se_nickname, se_oldpassword, se_newpassword, se_retypepassword, se_aboutme, se_signature; function query(id) { return document.getElementById(id); } async function getUserContent() { let status = false; if('localStorage' in window && localStorage) { if(localStorage.getItem('ptc_user')) { se_userid = JSON.parse(localStorage.getItem('ptc_user')).user; se_userjson = await JBLOBFunctions.getBlobRecordSync('https://jsonblob.com/api/jsonBlob/' + se_userid, null); se_userjson = JSON.parse(se_userjson); status = true; } else { window.alert('You are not yet logged in!'); } } else { window.alert('Sorry but localStorage is not supported in your browser! Try using chrome!'); } return status; } function loadUserData() { query('se_nickname').value = se_userjson.nickname; query('se_aboutme').value = se_userjson.about_me; query('se_oldpassword').value = se_userjson.password; query('se_profile').src = se_userjson.prof_image; query('se_background').src = se_userjson.background_image; if(se_userjson.signature) query('se_signature').innerHTML = se_userjson.signature.html; if(se_userjson.country) query('se_country').innerHTML = se_userjson.country; } function savePersonalInformations() { // check the profile image // check the background image if(isImageOk(query('se_profile')) && isImageOk(query('se_background'))) { se_userjson.nickname = query('se_nickname').value; se_userjson.about_me = query('se_aboutme').value; if(se_userjson.se_country) se_userjson.se_country = query('se_country').innerHTML; else se_userjson["country"] = query('se_country').innerHTML; se_userjson.background_image = query('se_background').src; se_userjson.prof_image = query('se_profile').src; changeStatusState(query('personal_status'), 'Status: Personal Information Saved!', false); } else { changeStatusState(query('personal_status'), 'Status: Some images are failed to load, try uploading again.', true); } } function saveSecurity() { if(query('se_newpassword').value == query('se_retypepassword').value) { se_userjson.password = query('se_newpassword').value; changeStatusState(query('password_status'), 'Status: Password Saved!', false); } else { changeStatusState(query('password_status'), 'Status: password mismatched! please type again', true); query('se_retypepassword').value = ''; } } function saveSignature() { if(tinyMCE_Editor.returnWordCount() > 15) { query('signature_status').innerText = 'Status: Please add only maximum of 15 words!'; } else { if(se_userjson.signature) se_userjson.signature.html = tinyMCE_Editor.postContent(); else se_userjson["signature"] = { "html": tinyMCE_Editor.postContent() } changeStatusState(query('signature_status'), 'Status: Signature Saved!', false); } } function updateAccountBlob() { document.querySelector('.parent-container').style.pointerEvents = 'none'; JBLOBFunctions.PUTRecordBlob('https://jsonblob.com/api/jsonBlob/' + se_userid, function(data) { return se_userjson; }, function(data) { document.querySelector('.parent-container').style.pointerEvents = 'auto'; window.location.href = 'https://storehaccounts.blogspot.com/p/your-account-page.html?' + se_userid; }); } function changeStatusState(elem, status_string, isError) { elem.innerText = status_string; if(isError) { elem.classList.remove('success'); elem.classList.add('error'); } else { elem.classList.remove('error'); elem.classList.add('success'); } } function isImageOk(img) { // During the onload event, IE correctly identifies any images that // weren’t downloaded as not complete. Others should too. Gecko-based // browsers act like NS4 in that they report this incorrectly. if (!img.complete) { return false; } // However, they do have two very useful properties: naturalWidth and // naturalHeight. These give the true size of the image. If it failed // to load, either of these should be zero. if (img.naturalWidth === 0) { return false; } // No other way of checking: assume it’s ok. return true; } file_background.addEventListener("change", ev => { query('background_status').innerText = 'Status Upload: Uploading...'; const formdata = new FormData() formdata.append("image", ev.target.files[0]) fetch("https://api.imgbb.com/1/upload?key=07f1351d4e674784012d92ae6e03b49d", { method: "post", body: formdata }).then(data => data.json()).then(data => { let url = data.data.thumb.url; query('se_background').src = url; query('background_status').innerText = 'Status Upload: Success Upload!'; }).catch((data) => { window.alert("Error in uploading! Try again."); }); }); file_profile.addEventListener("change", ev => { query('profile_status').innerText = 'Status Upload: Uploading...'; const formdata = new FormData() formdata.append("image", ev.target.files[0]) fetch("https://api.imgbb.com/1/upload?key=07f1351d4e674784012d92ae6e03b49d", { method: "post", body: formdata }).then(data => data.json()).then(data => { let url = data.data.thumb.url; query('se_profile').src = url; query('profile_status').innerText = 'Status Upload: Success Upload!'; }).catch((data) => { window.alert("Error in uploading! Try again."); }); }); </script>