Actually fix wrong URLs

This commit is contained in:
foxster-mp4
2023-04-30 11:27:51 -07:00
parent 2456da796d
commit 1c3bb417cc
2 changed files with 6 additions and 11 deletions

View File

@@ -1,10 +1,5 @@
(function main() {
const success = url => {
const host = window.location.host;
var path = window.location.pathname.split("/")[1];
path = path?.trim === "" ? "" : `/${path}`;
window.location.replace(`${host}${path}?source=${url}`
)};
const success = url => window.location.replace(`index.html?source=${url}`);
// If valid source provided
if (urlSearchParams.has('source') && isValidHTTPURL(sourceURL))

View File

@@ -17,31 +17,31 @@
<div class="header">
<h2>Suggested</h2>
</div>
<a href="/?source=https://therealfoxster.github.io/altsource/data/apps.json">
<a href="index.html?source=https://therealfoxster.github.io/altsource/data/apps.json">
<div class="suggestion">
<i class="bi bi-search"></i>
Foxster's AltSource
</div>
</a>
<a href="/?source=https://qnblackcat.github.io/AltStore/apps.json">
<a href="index.html?source=https://qnblackcat.github.io/AltStore/apps.json">
<div class="suggestion">
<i class="bi bi-search"></i>
Qn_'s AltStore Repo
</div>
</a>
<a href="/?source=https://alt.getutm.app">
<a href="index.html?source=https://alt.getutm.app">
<div class="suggestion">
<i class="bi bi-search"></i>
UTM Repository
</div>
</a>
<a href="/?source=https://flyinghead.github.io/flycast-builds/altstore.json">
<a href="index.html?source=https://flyinghead.github.io/flycast-builds/altstore.json">
<div class="suggestion">
<i class="bi bi-search"></i>
Flyinghead
</div>
</a>
<a href="/?source=https://provenance-emu.com/apps.json">
<a href="index.html?source=https://provenance-emu.com/apps.json">
<div class="suggestion">
<i class="bi bi-search"></i>
Provenance EMU