@indextools/index-games 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.svg +1158 -52
- package/package.json +1 -1
- package/public/config.js +12 -1
- package/public/index.css +30 -0
- package/public/index.html +2 -0
- package/public/index.svg +1158 -52
- package/public/sw.js +12 -0
package/public/sw.js
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
importScripts("https://unpkg.com/@mercuryworkshop/scramjet@2.0.0-alpha/dist/scramjet.all.js");
|
|
2
|
+
importScripts("https://unpkg.com/@titaniumnetwork-dev/ultraviolet@3.2.10/dist/uv.bundle.js");
|
|
3
|
+
importScripts("https://unpkg.com/@titaniumnetwork-dev/ultraviolet@3.2.10/dist/uv.config.js");
|
|
4
|
+
importScripts("https://unpkg.com/@titaniumnetwork-dev/ultraviolet@3.2.10/dist/uv.sw.js");
|
|
2
5
|
|
|
3
6
|
const { ScramjetServiceWorker } = $scramjetLoadWorker();
|
|
4
7
|
const scramjet = new ScramjetServiceWorker();
|
|
5
8
|
|
|
9
|
+
const baseDir = new URL("./", location.href).pathname;
|
|
10
|
+
if (self.__uv$config) {
|
|
11
|
+
self.__uv$config.prefix = baseDir + "uv/";
|
|
12
|
+
}
|
|
13
|
+
const uv = new self.UVServiceWorker(self.__uv$config);
|
|
14
|
+
|
|
6
15
|
async function handleRequest(event) {
|
|
16
|
+
if (uv.route(event)) {
|
|
17
|
+
return uv.fetch(event);
|
|
18
|
+
}
|
|
7
19
|
await scramjet.loadConfig();
|
|
8
20
|
if (scramjet.route(event)) {
|
|
9
21
|
return scramjet.fetch(event);
|