mirror of
https://github.com/arfct/itty-bitty.git
synced 2026-03-11 08:54:33 +00:00
Add bitsy renderer
This commit is contained in:
parent
042480e701
commit
627e2f50d8
2 changed files with 11781 additions and 0 deletions
|
|
@ -67,6 +67,7 @@
|
|||
"application/ld+json": {script:"recipe"},
|
||||
"text/canvas+javascript": {script:"canvas"},
|
||||
"text/javascript": {script:"script"},
|
||||
"application/bitsy": {script:"/render/bitsy.html", sandbox:"bitsy"},
|
||||
"c": {script:"color"},
|
||||
"text/rawhtml": {script:"parse"},
|
||||
"javascript": {script:"bookmarklet"},
|
||||
|
|
@ -369,6 +370,10 @@
|
|||
|
||||
let src = window.scriptDomain ?? location.origin;
|
||||
src += "/render";
|
||||
|
||||
if (params.script.endsWith(".html")) {
|
||||
src = params.script;
|
||||
}
|
||||
let sandbox = params.renderer?.sandbox;
|
||||
if (sandbox == "hash") { // Generate sandbox based off of body hash
|
||||
let hash = await bitty.hashString(params.body);
|
||||
|
|
|
|||
11776
docs/render/bitsy.html
Normal file
11776
docs/render/bitsy.html
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue