From 0e168eabb6a66c3a3e749f855c000fbf502e26b3 Mon Sep 17 00:00:00 2001 From: foxster-mp4 Date: Mon, 22 May 2023 13:56:51 -0700 Subject: [PATCH] Update "Add to AltStore" banner --- css/uibanner.css | 1 + js/main.js | 4 +++- js/shared.js | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/css/uibanner.css b/css/uibanner.css index 3bc2e09..6d0ae8e 100644 --- a/css/uibanner.css +++ b/css/uibanner.css @@ -60,6 +60,7 @@ } .uibanner>.content a { + margin-left: 6px; text-decoration: none; color: unset; font-weight: 600; diff --git a/js/main.js b/js/main.js index 0236cf3..b11ee65 100644 --- a/js/main.js +++ b/js/main.js @@ -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(); diff --git a/js/shared.js b/js/shared.js index c5dde47..d206137 100644 --- a/js/shared.js +++ b/js/shared.js @@ -48,7 +48,7 @@ const appHeaderHTML = app => app ? ` ` : undefined; -function insertAddToAltStoreBanner() { +function insertAddToAltStoreBanner(source) { document.getElementById("top")?.insertAdjacentHTML("afterbegin", `
altstore-icon @@ -56,7 +56,7 @@ function insertAddToAltStoreBanner() {

AltStore

- Add this source to AltStore to receive app updates (requires AltStore beta) + Add ${source ? "\"" + source + "\"" : "this source"} to AltStore to receive app updates