Skip to content

Commit

Permalink
fix: use coi.js
Browse files Browse the repository at this point in the history
  • Loading branch information
realstealthninja committed Jul 18, 2024
1 parent 88ee0fe commit f6a7d72
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion export_presets.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,34 @@ vram_texture_compression/for_desktop=true
vram_texture_compression/for_mobile=false
html/export_icon=true
html/custom_html_shell=""
html/head_include="<script src=\"coi-serviceworker.js\"></script>"
html/head_include="<script>
// sw.js
self.addEventListener(\"fetch\", function (event) {
if (event.request.cache === \"only-if-cached\" && event.request.mode !== \"same-origin\") {
return;
}
event.respondWith(
fetch(event.request)
.then(function (response) {
const newHeaders = new Headers(response.headers);
newHeaders.set(\"Cross-Origin-Embedder-Policy\", \"require-corp\");
newHeaders.set(\"Cross-Origin-Opener-Policy\", \"same-origin\");
const moddedResponse = new Response(response.body, {
status: response.status,
statusText: response.statusText,
headers: newHeaders,
});
return moddedResponse;
})
.catch(function (e) {
console.error(e);
})
);
});s
</script>"
html/canvas_resize_policy=2
html/focus_canvas_on_start=true
html/experimental_virtual_keyboard=false
Expand Down

0 comments on commit f6a7d72

Please sign in to comment.