Skip to content

Commit

Permalink
Merge pull request #436 from shorepine/coi
Browse files Browse the repository at this point in the history
coi
  • Loading branch information
bwhitman authored Jan 3, 2025
2 parents cedefc8 + fe12a54 commit ad95621
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 30 deletions.
8 changes: 0 additions & 8 deletions tulip/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,6 @@ if [ "$TYPE" == "upload" ]; then
fi
cd ..

# Now do web
cd ../web
make clean
./build.sh
if [ "$TYPE" == "upload" ]; then
git commit -a -m "deploying Tulip Web"; git push -u origin HEAD; gh pr create -f; gh pr merge -m
fi
cd ..



Expand Down
3 changes: 2 additions & 1 deletion www/run/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<meta property="product:price:amount" content="58.90"/>
<meta property="product:price:currency" content="USD"/>
<meta property="og:availability" content="instock" />
<script src="./mini-coi.js" scope="./"></script>

<link rel="icon" type="image/png" sizes="32x32" href="/img/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/img/favicon-16x16.png">
Expand All @@ -33,7 +34,7 @@
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/webmidi@latest/dist/iife/webmidi.iife.js"></script>
<script src="micropython.mjs" type="module"></script>
<script type="text/javascript" src="enable-threads.js"></script>
<!--<script type="text/javascript" src="enable-threads.js"></script>-->
<script type="text/javascript" src="amy-audioin.js"></script>
<script type="text/javascript" src="spss.js"></script>
</head>
Expand Down
Binary file modified www/run/micropython.data
Binary file not shown.
42 changes: 21 additions & 21 deletions www/run/micropython.mjs

Large diffs are not rendered by default.

Binary file modified www/run/micropython.wasm
Binary file not shown.
28 changes: 28 additions & 0 deletions www/run/mini-coi.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*! coi-serviceworker v0.1.7 - Guido Zuidhof and contributors, licensed under MIT */
/*! mini-coi - Andrea Giammarchi and contributors, licensed under MIT */
(({ document: d, navigator: { serviceWorker: s } }) => {
if (d) {
const { currentScript: c } = d;
s.register(c.src, { scope: c.getAttribute('scope') || '.' }).then(r => {
r.addEventListener('updatefound', () => location.reload());
if (r.active && !s.controller) location.reload();
});
}
else {
addEventListener('install', () => skipWaiting());
addEventListener('activate', e => e.waitUntil(clients.claim()));
addEventListener('fetch', e => {
const { request: r } = e;
if (r.cache === 'only-if-cached' && r.mode !== 'same-origin') return;
e.respondWith(fetch(r).then(r => {
const { body, status, statusText } = r;
if (!status || status > 399) return r;
const h = new Headers(r.headers);
h.set('Cross-Origin-Opener-Policy', 'same-origin');
h.set('Cross-Origin-Embedder-Policy', 'require-corp');
h.set('Cross-Origin-Resource-Policy', 'cross-origin');
return new Response(body, { status, statusText, headers: h });
}));
});
}
})(self);

0 comments on commit ad95621

Please sign in to comment.