Changed Success UX

This commit is contained in:
Roger Joys
2026-03-16 05:48:52 -07:00
parent d160578588
commit 00acbf89c1
2 changed files with 12 additions and 1 deletions

View File

@@ -12,7 +12,16 @@
el.textContent = seconds;
if (seconds <= 0) {
clearInterval(timer);
window.location.href = "{{ original_url }}";
const ua = "{{ user_agent }}";
if (ua.includes("iphone") || ua.includes("ipad") || ua.includes("mac")) {
window.location.href = "http://captive.apple.com/hotspot-detect.html";
} else if (ua.includes("android")) {
window.location.href = "http://connectivitycheck.gstatic.com/generate_204";
} else if (ua.includes("windows")) {
window.location.href = "http://www.msftconnecttest.com/connecttest.txt";
} else {
window.location.href = "{{ original_url }}";
}
}
}, 1000);
</script>