oxedyne/fe2o3/fe2o3_austenite/web/pearl-reader/shot.html
915 bytes, 7 runs
created by r1870400018:38488, which is this file's identity for as long as the history lasts, whatever it is later renamed to
download · who wrote it · its history
| 1 | <!DOCTYPE html> |
| 2 | <html lang="en"> |
| 3 | <head> |
| 4 | <meta charset="utf-8"> |
| 5 | <title>Pearl shot</title> |
| 6 | <style> |
| 7 | html, body { margin: 0; padding: 0; background: #fff; } |
| 8 | svg { display: block; } |
| 9 | </style> |
| 10 | </head> |
| 11 | <body> |
| 12 | <script src="jdat.js"></script> |
| 13 | <script src="pearl.js"></script> |
| 14 | <script> |
| 15 | // A bare, chromeless single-page render for pixel-diffing against Austenite's reference SVG. |
| 16 | // ?doc=<file>&page=<n> -- renders exactly that page's <svg> at the top-left, 1 px per point. |
| 17 | (async () => { |
| 18 | const p = new URLSearchParams(location.search); |
| 19 | const url = p.get("doc") || "samples/keystone.prl"; |
| 20 | const page = parseInt(p.get("page") || "0", 10); |
| 21 | const res = await fetch(url, { cache: "no-store" }); |
| 22 | const doc = Jdat.parse(await res.text()); |
| 23 | const entry = doc.index[page]; |
| 24 | const svg = Pearl.renderPage(doc, entry.block); |
| 25 | document.body.appendChild(svg); |
| 26 | document.title = "ready"; |
| 27 | })(); |
| 28 | </script> |
| 29 | </body> |
| 30 | </html> |