Compare commits
9 Commits
d383808f4f
...
v1.6.8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6b8ac5ca1d | ||
|
|
2964eba88b | ||
|
|
089e5375b4 | ||
|
|
e514f42dbe | ||
|
|
f7a9b061ea | ||
|
|
fe75347682 | ||
|
|
5c5255058c | ||
|
|
e16398ef74 | ||
|
|
6a57e2716f |
@@ -99,15 +99,20 @@ echo "✅ Standalone HTML: $DIST_DIR/kantine-standalone.html"
|
||||
# Escape CSS for embedding in JS string
|
||||
CSS_ESCAPED=$(echo "$CSS_CONTENT" | sed "s/'/\\\\'/g" | tr '\n' ' ' | sed 's/ */ /g')
|
||||
|
||||
# Build bookmarklet payload
|
||||
# Create a minified version for the injected bookmarklet payloads
|
||||
echo "Minifying JS with Terser..."
|
||||
TEMP_JS=$(mktemp)
|
||||
echo "$JS_CONTENT" > "$TEMP_JS"
|
||||
JS_MINIFIED=$(npx -y terser "$TEMP_JS" --compress --mangle)
|
||||
rm -f "$TEMP_JS"
|
||||
|
||||
cat > "$DIST_DIR/bookmarklet-payload.js" << PAYLOADEOF
|
||||
(function(){
|
||||
javascript:(function(){
|
||||
if(window.__KANTINE_LOADED){alert('Kantine Wrapper already loaded!');return;}
|
||||
var s=document.createElement('style');
|
||||
s.textContent='${CSS_ESCAPED}';
|
||||
document.head.appendChild(s);
|
||||
var s=document.createElement('style');s.textContent='${CSS_ESCAPED}';document.head.appendChild(s);
|
||||
// Inject JS logic
|
||||
var sc=document.createElement('script');
|
||||
sc.textContent=$(echo "$JS_CONTENT" | python3 -c "import sys,json; print(json.dumps(sys.stdin.read()))" 2>/dev/null || echo "$JS_CONTENT" | sed 's/\\/\\\\/g' | sed "s/'/\\\\'/g" | sed 's/"/\\\\"/g' | tr '\n' ' ' | sed 's/^/"/' | sed 's/$/"/');
|
||||
sc.textContent=$(echo "$JS_MINIFIED" | python3 -c "import sys,json; print(json.dumps(sys.stdin.read()))" 2>/dev/null || echo "$JS_MINIFIED" | sed 's/\\/\\\\/g' | sed "s/'/\\\\'/g" | sed 's/"/\\\\"/g' | tr '\n' ' ' | sed 's/^/"/' | sed 's/$/"/');
|
||||
document.head.appendChild(sc);
|
||||
})();
|
||||
PAYLOADEOF
|
||||
@@ -239,12 +244,11 @@ fi
|
||||
|
||||
# Embed the bookmarklet URL inline
|
||||
echo "document.getElementById('bookmarklet-link').href = " >> "$DIST_DIR/install.html"
|
||||
echo "$JS_CONTENT" | python3 -c "
|
||||
echo "$JS_MINIFIED" | python3 -c "
|
||||
import sys, json, urllib.parse
|
||||
|
||||
# 1. Read JS and Replace VERSION + Favicon
|
||||
js_template = sys.stdin.read()
|
||||
js = js_template.replace('{{VERSION}}', '$VERSION').replace('{{FAVICON_DATA_URI}}', '$FAVICON_URL')
|
||||
js = sys.stdin.read()
|
||||
|
||||
# 2. Prepare CSS for injection via createElement('style')
|
||||
css = open('$CSS_FILE').read().replace('\n', ' ').replace(' ', ' ')
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
## v1.6.8 (2026-03-06)
|
||||
- ⚡ **Performance**: Das JavaScript für das Kantinen-Bookmarklet wird nun beim Build-Prozess (via Terser) minimiert, was die Länge der injizierten URL spürbar reduziert.
|
||||
|
||||
## v1.6.7 (2026-03-06)
|
||||
- 🎨 **Style**: Das neue Header-Logo (`favicon_base.png`) wird nun konsequent auf 40x40px generiert und gerendert.
|
||||
|
||||
|
||||
9
dist/bookmarklet-payload.js
vendored
9
dist/bookmarklet-payload.js
vendored
File diff suppressed because one or more lines are too long
2
dist/bookmarklet.txt
vendored
2
dist/bookmarklet.txt
vendored
File diff suppressed because one or more lines are too long
16
dist/install.html
vendored
16
dist/install.html
vendored
File diff suppressed because one or more lines are too long
12
dist/kantine-standalone.html
vendored
12
dist/kantine-standalone.html
vendored
File diff suppressed because one or more lines are too long
@@ -80,7 +80,7 @@
|
||||
<header class="app-header">
|
||||
<div class="header-content">
|
||||
<div class="brand">
|
||||
<img src="{{FAVICON_DATA_URI}}" alt="Logo" class="logo-img" style="height: 40px; width: 40px; object-fit: contain;">
|
||||
<img src="{{FAVICON_DATA_URI}}" alt="Logo" class="logo-img" style="height: 2em; width: 2em; object-fit: contain;">
|
||||
<div class="header-left">
|
||||
<h1>Kantinen Übersicht <small class="version-tag" style="font-size: 0.6em; opacity: 0.7; font-weight: 400; cursor: pointer;" title="Klick für Versionsmenü">{{VERSION}}</small></h1>
|
||||
<div id="last-updated-subtitle" class="subtitle"></div>
|
||||
@@ -268,7 +268,7 @@
|
||||
</main>
|
||||
|
||||
<footer class="app-footer">
|
||||
<p>Jetzt Bessa Einfach! • Knapp-Kantine Wrapper • <span id="current-year">${new Date().getFullYear()}</span> by Kaufis-Kitchen</p>
|
||||
<p>Jetzt Bessa Einfach! • Knapp-Kantine Wrapper • <span id="current-year">${new Date().getFullYear()}</span> by Kaufi 😃👍 mit Hilfe von KI 🤖</p>
|
||||
</footer>
|
||||
</div>`;
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
v1.6.7
|
||||
v1.6.8
|
||||
|
||||
Reference in New Issue
Block a user