From 50f02631658a5c60e4e38715426e4e050f852cad Mon Sep 17 00:00:00 2001
From: Nystik <236107-Nystik@users.noreply.gitlab.com>
Date: Sun, 22 Mar 2026 18:50:23 +0100
Subject: [PATCH] add cache-busting
---
scripts/patch-obsidian.js | 11 +++++++----
server/index.js | 14 ++++++++++++++
server/version.js | 23 +++++++++++++++++++++++
3 files changed, 44 insertions(+), 4 deletions(-)
create mode 100644 server/version.js
diff --git a/scripts/patch-obsidian.js b/scripts/patch-obsidian.js
index c11b673..023353e 100644
--- a/scripts/patch-obsidian.js
+++ b/scripts/patch-obsidian.js
@@ -6,6 +6,7 @@
const fs = require("fs");
const path = require("path");
+const { getVersion } = require("../server/version");
const asarDir = process.argv[2];
if (!asarDir) {
@@ -13,7 +14,7 @@ if (!asarDir) {
process.exit(1);
}
-function patchHtml(filePath) {
+function patchHtml(filePath, version) {
const backupPath = filePath + ".orig";
if (!fs.existsSync(filePath) && !fs.existsSync(backupPath)) {
@@ -46,8 +47,8 @@ function patchHtml(filePath) {
// Inject ignis scripts before the first \n' +
- '\n' +
+ `\n` +
+ `\n` +
'