meow
This commit is contained in:
parent
b3af057ae0
commit
bd3a41b6ae
14
index.html
14
index.html
|
@ -18,7 +18,10 @@
|
|||
<a href="about.html">About</a>
|
||||
</div>
|
||||
</div>-->
|
||||
<noscript><p style="width: 100%; background-color: #fffaa0; margin: 0; height: 30px;">This page might require JavaScript to work properly</h1></noscript>
|
||||
<noscript>
|
||||
<p style="width: 100%; background-color: #fffaa0; margin: 0; height: 30px;">This page might require JavaScript
|
||||
to work properly</h1>
|
||||
</noscript>
|
||||
<br>
|
||||
<div class="introductionDiv">
|
||||
<h1 class="w700">burgerstore</h1>
|
||||
|
@ -26,8 +29,13 @@
|
|||
</div>
|
||||
<div id="appGrid" class="appGrid">
|
||||
<a class="featuredApp" src="/"><img></a>
|
||||
<h3>iOS apps</h3>
|
||||
<a href="https://altstore.io/">AltStore</a> is required in order to install apps</p>
|
||||
<div id="iOSAppInfo" class="hidden">
|
||||
<h3>Featured apps for your device</h3>
|
||||
<a href="https://altstore.io/">AltStore</a> is required in order to install apps on iOS</p>
|
||||
</div>
|
||||
<div id="unknownAppInfo" class="hidden">
|
||||
<h3>No apps are available for your device</h3>
|
||||
<p>Supported operating systems include: Linux and iOS</p>
|
||||
</div>
|
||||
<script src="static/js/main.js"></script>
|
||||
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
let appGrid = document.getElementById("appGrid")
|
||||
let iOSAppInfo = document.getElementById("iOSAppInfo")
|
||||
let unknownAppInfo = document.getElementById("unknownAppInfo")
|
||||
|
||||
async function getStore(link) {
|
||||
const response = await fetch(link);
|
||||
|
@ -6,7 +8,21 @@ async function getStore(link) {
|
|||
return data
|
||||
}
|
||||
|
||||
getStore("repo/store.json").then((data) => {
|
||||
// check if on iOS or iPadOS
|
||||
if (navigator.userAgent.includes("iPhone") || navigator.userAgent.includes("iPad")) {
|
||||
|
||||
// get iOS version
|
||||
if (navigator.userAgent.split(" ")[5] == "like") {
|
||||
let iOSVersion = navigator.userAgent.split(" ")[4].replaceAll("_", ".")
|
||||
} else {
|
||||
let iOSVersion = navigator.userAgent.split(" ")[5].replaceAll("_", ".")
|
||||
}
|
||||
|
||||
// show iOS app info
|
||||
iOSAppInfo.classList.remove("hidden")
|
||||
|
||||
// Load AltStore repository
|
||||
getStore("repo/store.json").then((data) => {
|
||||
console.log(data["title"])
|
||||
console.log(data["apps"])
|
||||
for (index in data["apps"]) {
|
||||
|
@ -35,5 +51,9 @@ getStore("repo/store.json").then((data) => {
|
|||
appButton.innerText = "Get"
|
||||
appDiv.append(appButton)
|
||||
}
|
||||
//console.log(data)
|
||||
});
|
||||
});
|
||||
}
|
||||
// Unknown device
|
||||
else {
|
||||
unknownAppInfo.classList.remove("hidden")
|
||||
}
|
Reference in New Issue