aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2026-10-29 20:27:13 -0700
committerPinapelz <yukais@pinapelz.com>2026-10-29 20:27:13 -0700
commit29ff6ad6bcf6e7bfc9fece59a3bd849a786022a1 (patch)
tree00593a47efb36e4ca3ef4a54e45f906918082acd
parent96bfe2e1505b4ae250f2d5201f9541ceb01cec84 (diff)
change banners to absolute url
-rw-r--r--__pycache__/app.cpython-313.pycbin25145 -> 25241 bytes
-rw-r--r--app.py7
-rw-r--r--config.toml18
3 files changed, 14 insertions, 11 deletions
diff --git a/__pycache__/app.cpython-313.pyc b/__pycache__/app.cpython-313.pyc
index be184c3..8f15542 100644
--- a/__pycache__/app.cpython-313.pyc
+++ b/__pycache__/app.cpython-313.pyc
Binary files differ
diff --git a/app.py b/app.py
index 2b10dcd..2cf12f4 100644
--- a/app.py
+++ b/app.py
@@ -39,8 +39,11 @@ ALLOWED_STATIC_EXTENSIONS = {
}
-def safe_url(filename):
- return quote(str(filename or ""), safe="/")
+def safe_url(url):
+ raw = str(url or "").strip()
+ if not raw:
+ return ""
+ return quote(raw, safe=":/?&=#%+~@!$,;*-._")
diff --git a/config.toml b/config.toml
index e314aed..73bface 100644
--- a/config.toml
+++ b/config.toml
@@ -51,7 +51,7 @@ background_color = "#07111f" # Main background color
panel_color = "#101b2d" # Main panel and channel block color
accent_color = "#2589ff" # Buttons, highlights, and refresh timer
text_color = "#e8f2ff"
-banner_url = "banner.jpg" # Leave empty ("") to hide the header banner
+banner_url = "banner.jpg" # Absolute URL (e.g. "https://...") or path; leave empty ("") to hide the header banner
enable_stars = true # Set to true to enable a subtle animated space background
# Interface buttons and links
@@ -71,7 +71,7 @@ text = "another moekyun service"
author = ""
author_url = ""
-# Channel customization. Exact channel name => image filename.
+# Channel customization. Exact channel name => absolute image URL (e.g. "https://...")
[channel_banners]
"INFORMATION" = "info.png"
"GAME SERVERS" = "game.jpeg"
@@ -80,14 +80,14 @@ author_url = ""
"Wonhee HQ" = "illit.jpg"
[channel_icons]
-# "Lobby" = "lobby_icon.png"
-# "General" = "general_icon.png"
+# "Lobby" = "https://example.com/lobby_icon.png"
+# "General" = "https://example.com/general_icon.png"
[generic_images]
-background = "" # Default image applied to unknown channels
-icon = "" # Default icon applied to unknown channels
+background = "" # Default image URL applied to unknown channels
+icon = "" # Default icon URL applied to unknown channels
-# Server groups / roles: "GROUP_ID" = "Image"
+# Server groups / roles: "GROUP_ID" = "https://example.com/role_icon.png"
[role_icons]
-# "6" = "admin.png"
-# "9" = "vip.png"
+# "6" = "https://example.com/admin.png"
+# "9" = "https://example.com/vip.png"
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage