mirror of
https://github.com/godotengine/godot-website.git
synced 2025-12-31 09:48:43 +03:00
fix download redirects for Android users (#1055)
This commit is contained in:
@@ -113,6 +113,8 @@ description: "The requested resource is not available on the server."
|
||||
let link_platform = 'windows';
|
||||
if (navigator.platform.indexOf('Mac') !== -1) {
|
||||
link_platform = 'macos';
|
||||
} else if (navigator.userAgent.indexOf('Android') !== -1) {
|
||||
link_platform = 'android';
|
||||
} else if (navigator.platform.indexOf('Linux') !== -1) {
|
||||
link_platform = 'linux';
|
||||
}
|
||||
|
||||
@@ -17,9 +17,11 @@ redirect_from:
|
||||
|
||||
<script type="text/javascript">
|
||||
if (navigator.platform.indexOf('Mac') !== -1) {
|
||||
window.location = "/download/macos";
|
||||
window.location = "/download/macos/";
|
||||
} else if (navigator.userAgent.indexOf('Android') !== -1) {
|
||||
window.location = "/download/android/";
|
||||
} else if (navigator.platform.indexOf('Linux') !== -1) {
|
||||
window.location = "/download/linux";
|
||||
window.location = "/download/linux/";
|
||||
} else { // default to windows
|
||||
window.location = "/download/windows/";
|
||||
}
|
||||
|
||||
@@ -8,16 +8,18 @@ layout: default
|
||||
<div style="padding: 16px 32px">
|
||||
<h3>Redirecting...</h3>
|
||||
<p>
|
||||
If you are not being redirected automatically, <a href="/download/3.x/windows" class="set-os-download-url" data-version="3">click here</a>.
|
||||
If you are not being redirected automatically, <a href="/download/3.x/windows/" class="set-os-download-url" data-version="3">click here</a>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
if (navigator.platform.indexOf('Mac') !== -1) {
|
||||
window.location = "/download/3.x/macos";
|
||||
window.location = "/download/3.x/macos/";
|
||||
} else if (navigator.userAgent.indexOf('Android') !== -1) {
|
||||
window.location = "/download/3.x/android/";
|
||||
} else if (navigator.platform.indexOf('Linux') !== -1) {
|
||||
window.location = "/download/3.x/linux";
|
||||
window.location = "/download/3.x/linux/";
|
||||
} else { // default to windows
|
||||
window.location = "/download/3.x/windows";
|
||||
window.location = "/download/3.x/windows/";
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user