You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cb6410a
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ The site of the [missing-elements](https://github.com/missing-elements) web comp
9
9
|`/`| The project list, the tools (the build page first, with its how-to), and a footer of links |[src/index.njk](src/index.njk); the lists are in [src/_data/site.js](src/_data/site.js)|
10
10
|`/pdfjs-viewer/`| The docs of `<pdfjs-viewer-element>`, with a live preview |[src/pdfjs-viewer/](src/pdfjs-viewer/)|
11
11
|`/h5p/build/`| The build page, for people: what it makes, a sample that plays, and the build of a chat's source into a `.h5p`, in the visitor's browser |[src/h5p/build/](src/h5p/build/)|
12
-
| `/h5p/play/` | The play page, for a chat app to show in its reply (h5p-toolkit#210); no page links to it. It builds the activity in a link's `#source=` in the visitor's browser, as the build page does, and plays it with nothing beside it but its download and a link to the build page. A file of the visitor's own that the source names is chosen there or given by the page that frames it. A video or a recording can be given as its address: it plays from there at once and is fetched whole only for the download. A framing page that saves files itself is handed the download. A package bigger than that page saves stays behind the Download link, and the page says how to save it from such a frame. A framing page that opens links itself is handed the link to the build page. A link to the page may also carry the files' addresses and a wish to save (`&links=`, `&save=1`): the page then fetches them itself and tries to save the package with no press, saying to press Download where the browser saved nothing. That is how a framing page that opens links gets a package saved that it cannot save itself. | [src/h5p/play/](src/h5p/play/) |
12
+
| `/h5p/play/` | The play page, for a chat app to show in its reply (h5p-toolkit#210); no page links to it. It builds the activity in a link's `#source=` in the visitor's browser, as the build page does, and plays it with nothing beside it but its download and a link to the build page. A file of the visitor's own that the source names is chosen there or given by the page that frames it. A video or a recording can be given as its address: it plays from there at once and is fetched whole only for the download. A framing page that saves files itself is handed the download. A package bigger than that page saves stays behind the Download link, and the page says how to save it from such a frame. A framing page that opens links itself is handed the link to the build page. A link to the page may also carry the files' addresses and a wish to save (`&links=`, `&save=1`): in a tab of its own the page then draws no player: it fetches the files itself, builds the package and tries to save it with no press. Saved, it counts five seconds while it is looked at and then tries to close the tab; a tab the browser keeps open says to press Download where nothing was saved. That is how a framing page that opens links gets a package saved that it cannot save itself. | [src/h5p/play/](src/h5p/play/) |
13
13
|`/h5p/create-with-ai/`| The how-to, for people: installing the skill, asking a chat, the prompts to start from, the types, and what to do when something goes wrong |[src/h5p/create-with-ai/](src/h5p/create-with-ai/)|
14
14
|`/h5p/skill/`| The skill as zips to install: `h5p-author.zip`, installed once in a chat's place for skills, or attached to the message in each new chat where it has none, and `h5p-author-chatgpt.zip`, the same skill laid out as a plugin; and a page that lists them and the bundles' addresses, each in full, which no page links to |[src/h5p/skill/](src/h5p/skill/); the zips written by [vite.config.ts](vite.config.ts)|
15
15
|`/h5p/bundles/`| The skill's build tool and a library bundle per content type, for a chat that runs Node but cannot reach npm; and `h5p-author-build.tar.gz`, the tool and every library in one archive, for a person to attach to a chat whose code can download nothing | written by [vite.config.ts](vite.config.ts)|
// The addresses are used up: a file still missing is asked for, not played from another's.
484
+
links.clear()
485
+
take(files)
486
+
}catch{
487
+
if(stop.signal.aborted)return
488
+
links.clear()
489
+
ask(paths)
490
+
askText.textContent=`Your ${what} could not be fetched from the chat: its address may have run out. Choose ${paths.length===1 ? 'it' : 'them'} from your computer; ${paths.length===1 ? 'it stays' : 'they stay'} in your browser.`
491
+
}
492
+
}
493
+
494
+
/**
495
+
* The package saved in a tab that only saves, with no press, and the tab closed a few seconds
496
+
* later. The seconds are counted only while the page is seen and has the keyboard: otherwise a
497
+
* question of the browser's own, where to save or whether to, may be open over it, or waiting
498
+
* in a tab that was opened behind another.
499
+
*/
500
+
functionsavedHere(file: File): void{
501
+
saveUnasked=false
502
+
download.click()
503
+
constnamed=`${file.name}, ${sized(file.size)},`
504
+
letleft=5
505
+
constsaid=(): void=>{savedText.textContent=`${named} is in your downloads. This tab closes in ${left} s.`}
506
+
savedStay.hidden=false
507
+
savedPlay.hidden=true
508
+
said()
509
+
show('saved',`Your .h5p is saved: ${named} is in your downloads. This tab closes itself in a few seconds.`)
510
+
clearInterval(closing)
511
+
closing=setInterval(()=>{
512
+
if(document.hidden||!document.hasFocus())return
513
+
if(--left>0)returnsaid()
514
+
// A tab the browser lets no page close stays, and says what it would have.
515
+
stay()
516
+
window.close()
517
+
},1000)
518
+
}
519
+
520
+
/** The tab kept open: the way on where the browser saved nothing, and the activity to play. */
521
+
functionstay(): void{
522
+
clearInterval(closing)
523
+
savedText.textContent=`${kept?.name??'The .h5p'}, ${sized(kept?.size??0)}, is in your downloads. If nothing was saved, press Download.`
524
+
savedStay.hidden=true
525
+
savedPlay.hidden=false
526
+
}
527
+
437
528
/** How much of a file for the download has come. */
0 commit comments