forked from MarshMeadow/dantotustatic
-
Notifications
You must be signed in to change notification settings - Fork 1
/
alpha.html
73 lines (66 loc) · 2.54 KB
/
alpha.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:url" content="/alpha" />
<meta name="description" content="Get the latest alpha update of Jeanne!">
<meta property="og:image" content="https://s4.anilist.co/file/anilistcdn/user/avatar/large/b6110204-X922sXE3M8RC.png">
<meta name="theme-color" content="#b24b60" />
<title>Latest Jeanne Alpha Release</title>
<style>
body {
background-color: black; /* Set background color to black */
color: white; /* Set text color to white */
margin: 0; /* Remove default margin */
padding: 20px; /* Add padding to the content */
font-family: 'Arial', sans-serif; /* Set font family */
}
h1 {
color: yellow; /* Set heading color to yellow */
}
</style>
</head>
<body>
</body>
</html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<script>
// Function to fetch the latest release APK from GitHub API
async function fetchLatestAPK() {
const repo = 'kaorlol/dantotsu-updater'; // GitHub repository owner and name
const apiUrl = `https://api.github.com/repos/${repo}/releases/latest`;
try {
const response = await fetch(apiUrl);
const data = await response.json();
if (response.ok) {
// Find the APK asset
const apkAsset = data.assets.find(asset => asset.name.endsWith('.apk'));
if (apkAsset) {
// Trigger the APK download
const downloadLink = document.createElement('a');
downloadLink.href = apkAsset.browser_download_url;
downloadLink.download = apkAsset.name;
downloadLink.click();
} else {
console.error('No APK asset found in the latest release.');
}
} else {
console.error('Failed to fetch release information:', data.message);
}
} catch (error) {
console.error('Error fetching release information:', error);
}
}
// Call the function when the page loads
window.onload = function() {
fetchLatestAPK();
};
</script>
</body>
</html>