Bookmarklet Spreadsheet
Features:
- Click a cell to edit it
- Cells evaluate basic functions on blur
- Reference other cell addresses (e.g. A1 or B5)
- Resizeable columns
To use, copy/paste this into your address bar, then bookmark it:
data:text/html,%3Cbody%3E%3Cstyle%3Ebody{display:grid;grid-template:auto/repeat(26,1fr);margin: 0;}.c{display:grid;grid-template:auto/1fr;}.h{width:100px;background:lightgrey;resize:horizontal;overflow:hidden;text-align:center;}input{width:100%;}%3C/style%3E%3Cscript%3Eif(!document.querySelector("input")){for(let i=0;i%3C26;i++){let a=document.createElement("div");a.classList.add("c");let b=document.createElement("div");b.classList.add("h");b.innerText="ABCDEFGHIJKLMNOPQRSTUVWXYZ"[i];a.appendChild(b);for(let j=0;j%3C100;j++){let c=document.createElement("input");c.classList.add("ABCDEFGHIJKLMNOPQRSTUVWXYZ"[i]+(j+1));c.addEventListener("blur",(e)=%3E{e.target.setAttribute("placeholder",e.target.value)||"";if(e.target.value){e.target.value=eval(e.target.value.replaceAll(/[A-Z]\d+/g,(x)=%3Edocument.querySelector(`.${x}`).value));}});c.addEventListener("focus",(e)=%3E{e.target.value=e.target.getAttribute("placeholder");});a.appendChild(c);}document.body.appendChild(a);}}%3C/script%3E
To-do:
- Update all cells at once
- Find a way to save data locally
- Handle array references/outputs