-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
launch.html
25 lines (25 loc) · 949 Bytes
/
launch.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<!DOCTYPE html>
<html>
<head>
<script>
let params = new URLSearchParams(location.search);
fetch('https://api.github.com/repos/Mistium/Origin-OS/contents/Versions')
.then(response => response.json())
.then(data => {
const versions = data.map(file => file.name);
const latestVersion = versions.sort().reverse()[0];
const url = `https://origin.mistium.com/Versions/${latestVersion}`;
const carryOverParams = params.toString() ? `?${params.toString()}` : '';
window.location.href = `${url}${carryOverParams}`;
})
.catch(error => {
console.error('Error fetching versions:', error);
const url = 'https://launcher.mistium.com';
const carryOverParams = params.toString() ? `?${params.toString()}` : '';
window.location.href = `${url}${carryOverParams}`;
});
</script>
</head>
<body>
</body>
</html>