-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #436 from shorepine/coi
coi
- Loading branch information
Showing
6 changed files
with
51 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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"> | ||
|
@@ -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> | ||
|
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |