"use strict";window.onload=async()=>{JSON.parse(localStorage.getItem("account")).token;const e=document.getElementById("content");document.getElementById("ls").addEventListener("click",(()=>{e.innerHTML="";const t=document.createElement("div");t.id="lsEditor";const n=document.createElement("div");n.classList.add("adder");const o=document.createElement("input"),a=document.createElement("textarea"),d=document.createElement("button");d.textContent="Add",d.addEventListener("click",(()=>{localStorage.setItem(o.value,a.value),location.reload()})),n.appendChild(o),n.appendChild(a),n.appendChild(d),t.appendChild(n);for(let e=0;e<localStorage.length;e++){const n=localStorage.key(e),o=document.createElement("div");o.classList.add("record");const a=document.createElement("header");a.textContent=n;const d=document.createElement("textarea");d.textContent=localStorage.getItem(n);const c=document.createElement("button");c.textContent="Save",c.addEventListener("click",(()=>{localStorage.setItem(n,d.value),location.reload()}));const l=document.createElement("button");l.textContent="Remove",l.addEventListener("click",(()=>{localStorage.removeItem(n),location.reload()})),o.appendChild(a),o.appendChild(d),o.appendChild(c),o.appendChild(l),t.appendChild(o)}e.appendChild(t)}))};