|
|
|
|
|
by mcteamster
302 days ago
|
|
Been doing something similar with save files for my game. Line 1 is "<!DOCTYPE html><html><head><script>const rawData =" and line 2 is all the state. Then the save button downloads document.documentElement.outerHTML with line 2 replaced by the current state. No server required. https://github.com/mcteamster/white/blob/main/src/lib/data.t... |
|
data:text/html,<html><head><title>Notepad</title><style>html,body{margin:0;padding:0;}textarea{padding:10px;font-family:Courier;font-size:16px;height:100%;width:100%;border:none;outline:none;}</style></head><body><textarea style="height:100%;width:100%;font-size:16px;padding:10px;"></textarea><script>document.getElementsByTagName('textarea')[0].focus()</script></body></html>