Update "Add to AltStore" banner

This commit is contained in:
foxster-mp4
2023-05-22 13:56:51 -07:00
parent 0d8e89dd2f
commit 0e168eabb6
3 changed files with 6 additions and 3 deletions

View File

@@ -60,6 +60,7 @@
}
.uibanner>.content a {
margin-left: 6px;
text-decoration: none;
color: unset;
font-weight: 600;

View File

@@ -6,7 +6,7 @@
else if (!isValidHTTPURL(sourceURL)) {
alert("Invalid HTTP URL.");
search();
} else insertAddToAltStoreBanner();
}
})();
fetch(sourceURL)
@@ -16,6 +16,8 @@ fetch(sourceURL)
const tintColor = json.tintColor?.replaceAll("#", "");
if (tintColor) setTintColor(tintColor);
insertAddToAltStoreBanner(json.name);
setApps(json.apps);
main(json);
waitForAllImagesToLoad();

View File

@@ -48,7 +48,7 @@ const appHeaderHTML = app => app ? `
</div>
</div>` : undefined;
function insertAddToAltStoreBanner() {
function insertAddToAltStoreBanner(source) {
document.getElementById("top")?.insertAdjacentHTML("afterbegin", `
<div class="uibanner">
<img src="https://user-images.githubusercontent.com/705880/65270980-1eb96f80-dad1-11e9-9367-78ccd25ceb02.png" alt="altstore-icon" class="icon">
@@ -56,7 +56,7 @@ function insertAddToAltStoreBanner() {
<div class="text-container">
<p class="title-text">AltStore <span class="small beta badge"></span></p>
<p class="detail-text">
Add this source to AltStore to receive app updates (requires AltStore beta)
Add ${source ? "\"" + source + "\"" : "this source"} to AltStore to receive app updates
</p>
</div>
<a href="altstore://source?url=${sourceURL}">