diff --git a/main.js b/main.js index 4eb1f52..bdca6b0 100644 --- a/main.js +++ b/main.js @@ -329,7 +329,11 @@ async function purchaseProduct(cf_clearance, token, productId, amount) { function startServer(port, host) { const server = http.createServer((req, res) => { - const parsed = url.parse(req.url, true); + const ultrabotUrl = new URL(req.url, `http://${req.headers.host || 'localhost'}`); // If the host is not present in the request header, localhost is used by default. + const parsed = { + pathname: ultrabotUrl.pathname, + query: Object.fromEntries(ultrabotUrl.searchParams) + }; ensureDb(); if (parsed.pathname === '/' || parsed.pathname === '/index.html') { const htmlPath = path.resolve(process.cwd(), 'public', 'index.html'); diff --git a/public/index.html b/public/index.html index 51d6752..acbc18a 100644 --- a/public/index.html +++ b/public/index.html @@ -654,6 +654,12 @@ box-shadow: 0 8px 30px rgba(0,0,0,0.35); max-width: min(95vw, 720px); } + + /* Premium mode */ + #palette-mode.premium-mode { bottom: 100px; left: 50%; transform: translateX(-50%); } + /* Free mode */ + #palette-mode.free-mode { bottom: 76px; left: 50%; transform: translateX(-50%); } + /* Premium/Free switcher next to palette (toggle style) */ .palette-mode-wrap { position: fixed; z-index: 1002; display: inline-flex; align-items: center; gap: 10px; pointer-events: auto; padding: 6px 10px; border-radius: 12px; background: rgba(17, 20, 24, 0.85); border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 8px 30px rgba(0,0,0,0.35); backdrop-filter: blur(6px); } @media (max-width: 760px){ .palette-mode-wrap { bottom: 128px !important; } } @@ -1041,7 +1047,7 @@
-