From d6798e31de8eafe5de74103e8342c791ce36ea53 Mon Sep 17 00:00:00 2001 From: Hatter Jiang Date: Wed, 15 Apr 2026 00:14:10 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=84=20Add=20refresh=20button=20and=20s?= =?UTF-8?q?tyling=20for=20QR=20Code=20Parser=20interface?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- parse-qr/index.html | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/parse-qr/index.html b/parse-qr/index.html index 53fc0c2..cb7da85 100644 --- a/parse-qr/index.html +++ b/parse-qr/index.html @@ -49,6 +49,24 @@ text-align: center; color: #333; margin-bottom: 10px; + position: relative; + } + + .refresh-btn { + position: absolute; + top: -30px; + right: -30px; + background: transparent; + border: none; + font-size: 20px; + cursor: pointer; + padding: 8px; + border-radius: 50%; + transition: background 0.2s; + } + + .refresh-btn:hover { + background: #f0f0f0; } .subtitle { @@ -60,7 +78,7 @@ .drop-zone { border: 3px dashed #667eea; border-radius: 12px; - padding: 60px 20px; + padding: 45px 20px; text-align: center; background: #f8f9ff; transition: all 0.3s ease; @@ -361,7 +379,10 @@
-

🔍 QR Code Parser

+

+ 🔍 QR Code Parser + +

Drag & drop, paste, or click to browse an image

@@ -407,6 +428,7 @@ const error = document.getElementById('error'); const loading = document.getElementById('loading'); const cameraBtn = document.getElementById('cameraBtn'); + const refreshBtn = document.getElementById('refreshBtn'); const cameraModal = document.getElementById('cameraModal'); const closeCamera = document.getElementById('closeCamera'); const video = document.getElementById('video'); @@ -637,6 +659,10 @@ }); }); + refreshBtn.addEventListener('click', () => { + location.reload(); + }); + cameraBtn.addEventListener('click', async () => { try { stream = await navigator.mediaDevices.getUserMedia({