Load layouts and optional features from staged asset caches

This commit is contained in:
Jonathan Sykes
2026-10-08 01:29:50 +08:00
parent d98d444552
commit 5d6a1545df
30 changed files with 512 additions and 146 deletions

View File

@@ -6,11 +6,11 @@
^ * Out: { ok: true, sha256, size, engine } | { ok: false, error }
* ========================================================================== */
'use strict';
importScripts('/sha256.js');
self.onmessage = async (e) => {
const { name } = e.data || {};
try {
if (!self.Sha256) { self.__ASSET_URLS__=e.data.assetUrls || {}; importScripts(self.__ASSET_URLS__.sha256 || '/sha256.js'); }
const root = await navigator.storage.getDirectory();
const dir = await root.getDirectoryHandle('videos');
const file = await (await dir.getFileHandle(String(name))).getFile();