Skip to content

Commit

Permalink
Redirect default url based on browser's language
Browse files Browse the repository at this point in the history
  • Loading branch information
qgustavor committed May 26, 2024
1 parent 09dd750 commit aad9bbb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
<head>
<title>Redirecting...</title>
<style>html{background:#000;color:#fff;text-align:center;font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif}</style>
<script>location = 'https://qgustavor.github.io/mkv-extract/en/'</script>
<meta http-equiv="refresh" content="0; url=https://qgustavor.github.io/mkv-extract/en/" />
<script>
let language = navigator.language
if (!['en', 'pt'].includes(language)) language = 'en'
location = 'https://qgustavor.github.io/mkv-extract/' + language + '/'
</script>
<meta http-equiv="refresh" content="1; url=https://qgustavor.github.io/mkv-extract/en/" />
</head>
<body>
<p>Redirecting...</p>
Expand Down

0 comments on commit aad9bbb

Please sign in to comment.