mirror of
https://gitlab.com/lolmam/Phigros-Android-History.git
synced 2026-02-04 16:21:11 +00:00
Added short redirection
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
<header>
|
<header>
|
||||||
<nav>
|
<nav>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="https://phigros.lolmam.top/">Home</a></li>
|
<li><a href="index">Home</a></li>
|
||||||
<li><a href="versions">Versions</a></li>
|
<li><a href="versions">Versions</a></li>
|
||||||
<li><a href="install">Install Guide</a></li>
|
<li><a href="install">Install Guide</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<main class="container">
|
<main class="container">
|
||||||
<h1>Phigros Android Versions</h1>
|
<h1>Phigros Android Versions</h1>
|
||||||
<p>Welcome to the fan made archive of almost every <strong>Phigros</strong> Android version.
|
<p>Welcome to the fan made archive of almost every <strong>Phigros</strong> Android version.
|
||||||
Find available versions, changelogs, and installation help for Google Play, TapTap, and other versions.</p>
|
Find available versions, changelogs, and installation help for <strong>G</strong> (Google Play), <strong>T</strong> (TapTap), and other versions.</p>
|
||||||
<p id="download-count">Loading downloads...</p>
|
<p id="download-count">Loading downloads...</p>
|
||||||
|
|
||||||
<section class="archive-stats">
|
<section class="archive-stats">
|
||||||
@@ -80,6 +80,33 @@
|
|||||||
content.setAttribute("aria-hidden", isOpen ? "false" : "true");
|
content.setAttribute("aria-hidden", isOpen ? "false" : "true");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// short url for jumping to versions
|
||||||
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
|
const allowedMajors = ["1", "2", "3"];
|
||||||
|
const hash = window.location.hash.trim();
|
||||||
|
if (!hash.startsWith("#v")) return;
|
||||||
|
const fullMatch = hash.match(/^#v(\d+)-(\d+)-(\d+)$/);
|
||||||
|
const majorMatch = hash.match(/^#v(\d+)$/);
|
||||||
|
let target = null;
|
||||||
|
let major = null;
|
||||||
|
if (fullMatch) {
|
||||||
|
major = fullMatch[1];
|
||||||
|
if (allowedMajors.includes(major)) {
|
||||||
|
target = `/versions/versions_${major}.x/${hash}`;
|
||||||
|
}
|
||||||
|
} else if (majorMatch) {
|
||||||
|
major = majorMatch[1];
|
||||||
|
if (allowedMajors.includes(major)) {
|
||||||
|
target = `/versions/versions_${major}.x/`;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (target) {
|
||||||
|
window.location.replace(target);
|
||||||
|
} else {
|
||||||
|
window.location.replace("/404.html");
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user