From 6f2a34ae0e830d588e05b507f66bd0af7d6baf8c Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Fri, 13 Feb 2026 11:11:46 +0100 Subject: [PATCH] feat: inject version number into installer and bookmarklet (v1.8.5) --- build-bookmarklet.sh | 25 ++++++++++++++----------- dist/install.html | 10 +++++----- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/build-bookmarklet.sh b/build-bookmarklet.sh index 54330c1..bdcbb70 100755 --- a/build-bookmarklet.sh +++ b/build-bookmarklet.sh @@ -8,9 +8,12 @@ DIST_DIR="$SCRIPT_DIR/dist" CSS_FILE="$SCRIPT_DIR/style.css" JS_FILE="$SCRIPT_DIR/kantine.js" +# === VERSION === +VERSION="v1.8.5" + mkdir -p "$DIST_DIR" -echo "=== Kantine Bookmarklet Builder ===" +echo "=== Kantine Bookmarklet Builder ($VERSION) ===" # Check files exist if [ ! -f "$CSS_FILE" ]; then echo "ERROR: $CSS_FILE not found"; exit 1; fi @@ -20,7 +23,7 @@ CSS_CONTENT=$(cat "$CSS_FILE") JS_CONTENT=$(cat "$JS_FILE") # === 1. Build standalone HTML (for local testing/dev) === -cat > "$DIST_DIR/kantine-standalone.html" << 'HTMLEOF' +cat > "$DIST_DIR/kantine-standalone.html" << HTMLEOF @@ -37,7 +40,7 @@ HTMLEOF # Inject CSS cat "$CSS_FILE" >> "$DIST_DIR/kantine-standalone.html" -cat >> "$DIST_DIR/kantine-standalone.html" << 'HTMLEOF' +cat >> "$DIST_DIR/kantine-standalone.html" << HTMLEOF @@ -47,7 +50,7 @@ HTMLEOF # Inject JS cat "$JS_FILE" >> "$DIST_DIR/kantine-standalone.html" -cat >> "$DIST_DIR/kantine-standalone.html" << 'HTMLEOF' +cat >> "$DIST_DIR/kantine-standalone.html" << HTMLEOF @@ -81,15 +84,15 @@ echo "javascript:${BOOKMARKLET_RAW}" > "$DIST_DIR/bookmarklet.txt" echo "✅ Bookmarklet URL: $DIST_DIR/bookmarklet.txt" # === 3. Create an easy-to-use HTML installer page === -cat > "$DIST_DIR/install.html" << 'INSTALLEOF' +cat > "$DIST_DIR/install.html" << INSTALLEOF - Kantine Wrapper Installer + Kantine Wrapper Installer ($VERSION) -

🍽️ Kantine Wrapper

+

🍽️ Kantine Wrapper $VERSION

Installation

  1. Ziehe den Button unten in deine Lesezeichen-Leiste (Drag & Drop)
  2. Navigiere zu web.bessa.app/knapp-kantine
  3. -
  4. Klicke auf das Lesezeichen Kantine Wrapper
  5. +
  6. Klicke auf das Lesezeichen Kantine $VERSION

✨ Features

@@ -136,8 +139,8 @@ bmk = '''javascript:(function(){if(window.__KANTINE_LOADED){alert(\"Already load print(json.dumps(bmk) + ';') " 2>/dev/null >> "$DIST_DIR/install.html" || echo "'javascript:alert(\"Build error\")'" >> "$DIST_DIR/install.html" -cat >> "$DIST_DIR/install.html" << 'INSTALLEOF' - document.getElementById('bookmarklet-link').textContent = '🍽️ Kantine Wrapper'; +cat >> "$DIST_DIR/install.html" << INSTALLEOF + document.getElementById('bookmarklet-link').textContent = 'Kantine $VERSION'; diff --git a/dist/install.html b/dist/install.html index 5992c92..580637c 100755 --- a/dist/install.html +++ b/dist/install.html @@ -2,10 +2,10 @@ - Kantine Wrapper Installer + Kantine Wrapper Installer (v1.8.5) -

🍽️ Kantine Wrapper

+

🍽️ Kantine Wrapper v1.8.5

Installation

  1. Ziehe den Button unten in deine Lesezeichen-Leiste (Drag & Drop)
  2. Navigiere zu web.bessa.app/knapp-kantine
  3. -
  4. Klicke auf das Lesezeichen Kantine Wrapper
  5. +
  6. Klicke auf das Lesezeichen Kantine v1.8.5

✨ Features

@@ -42,7 +42,7 @@