Replace version with the version from package.json
This commit is contained in:
parent
c15d64164b
commit
c330333ee6
1 changed files with 5 additions and 15 deletions
20
about.html
20
about.html
|
|
@ -410,7 +410,7 @@
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
<div class="sidebar-text">
|
<div class="sidebar-text">
|
||||||
<h1>Aviaclient</h1>
|
<h1>Aviaclient</h1>
|
||||||
<div class="version-chip">1.6.0</div>
|
<div id="aviaVersion" class="version-chip">TBD</div>
|
||||||
<p>
|
<p>
|
||||||
A custom desktop client with enhancements and additional features.
|
A custom desktop client with enhancements and additional features.
|
||||||
</p>
|
</p>
|
||||||
|
|
@ -578,20 +578,10 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
const data = new URLSearchParams(location.search);
|
window.addEventListener("load", () => {
|
||||||
function walk(node) {
|
const elem = document.getElementById("aviaVersion");
|
||||||
if (node.nodeType === Node.TEXT_NODE) {
|
if (elem) elem.textContent = window.native.versions.aviaClient();
|
||||||
node.textContent = node.textContent.replace(
|
});
|
||||||
/{{(\w+)}}/g,
|
|
||||||
(m, k) => data.get(k) || m,
|
|
||||||
);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (node.nodeType === Node.ELEMENT_NODE && node.nodeName !== "SCRIPT") {
|
|
||||||
for (const child of node.childNodes) walk(child);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
walk(document.body);
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue