fix os.version shim, improve docker image

This commit is contained in:
Nystik
2026-03-12 22:32:39 +01:00
parent 2aa16341a1
commit 12af8ae010
10 changed files with 79 additions and 41 deletions

View File

@@ -2,6 +2,7 @@
// Patches the extracted Obsidian asar for browser use:
// 1. Removes Content-Security-Policy meta tag
// 2. Injects shim-loader.js script (non-deferred, before all other scripts)
// 3. Injects favicon link
const fs = require("fs");
const path = require("path");
@@ -26,6 +27,12 @@ function patchHtml(filePath) {
"\n",
);
// Inject favicon into <head>
html = html.replace(
"</head>",
' <link rel="icon" type="image/png" href="favicon.png">\n</head>',
);
// Inject shim-loader before the first <script> tag
html = html.replace(
'<script type="text/javascript"',