Update index.html
This commit is contained in:
parent
036b925f17
commit
6f207899d7
1 changed files with 26 additions and 0 deletions
26
index.html
26
index.html
|
|
@ -318,4 +318,30 @@ nav ul li a:hover {
|
|||
</footer>
|
||||
|
||||
</body>
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
// Function to check if the user is on a legacy device
|
||||
function isLegacyDevice() {
|
||||
const userAgent = navigator.userAgent;
|
||||
|
||||
// List of legacy devices/browsers
|
||||
const legacyDevices = [
|
||||
/Nintendo DSi/i,
|
||||
/Windows XP/i,
|
||||
/MSIE/i, // Internet Explorer
|
||||
/Trident/i, // Internet Explorer 11+
|
||||
/Firefox\/3\.6/i, // Old Firefox version
|
||||
/Opera\/12/i, // Old Opera version
|
||||
];
|
||||
|
||||
// Check for any legacy device
|
||||
return legacyDevices.some(device => device.test(userAgent));
|
||||
}
|
||||
|
||||
// Redirect to legacy site if a legacy device is detected
|
||||
if (isLegacyDevice()) {
|
||||
window.location.href = "http://legacy.venith.net";
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue