{ const file = e. target files[0]; if (Ifile) return;
updateStatus.textContent = **: uploadSpinner.style.display = "inline-block"; resizelmage(file, 300, 300, (dataUrl) => { profilePic.src =
dataUrl; try { localStorage.setitem("profilePic", dataUrl): } catch (err) { console warn("Could not save profile picture in localStorage."): } updateProfilePic: }): }); function updateProfilePic { //Work done in local storage } function loadHistory(uuid) { const endpoint = https://script.google.com/macros/s/AKfycbxxnPCaQ1cnQ5n_50LVgWBRnsL_sM5n8xqiXjPc4wHIt7i0zzgBWjVi3A_eUMEBzNhIng/exec?
method=getHistory&uuid=${encodeURIComponent(uuid)}: fetch(endpoint) then(res => res res.json0) then(data => { const historyList =
document.getElementByld("historyList"); historyList.innerHTML = *** if (Idata success || data history || data.history.length === 0) {
historvList.innerHTML = "
No history found.
", return, data.history.forEachitem => const div = document.createlement div):
div. className = "history-item"; div.textContent = S[item action} | Date & Time: S(item time}': historyList.appendChild(div): }): }) catch(err
=> { const historyList = document.getElementByld ("historyList"): historyList.innerHTML = "
Failed to load history.
*,
console.error(err); }): } // Load history after page load loadHistory(userData uuid); function showAlert(message, duration = 3000) { const
alertBox = document.getElementByld(*alert-box): alertBox.textContent = message; alertBox.classList.add(show');
clearTimeout(alertBox_timeout); alertBox._timeout = setTimeout() => { alertBox. classList. remove(show): }, duration): } ‹div id="alert-box'»«/div» «/body>