1
0
mirror of https://github.com/PurpleI2P/purplei2p.github.io synced 2025-02-01 01:04:22 +00:00

always show download links block

Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
R4SAS 2022-06-07 01:10:21 +03:00
parent 2db585d88d
commit e4337e6c78
Signed by: r4sas
GPG Key ID: 66F6C87B98EBCFE2
2 changed files with 2 additions and 4 deletions

View File

@ -25,7 +25,7 @@
<a href="https://github.com/PurpleI2P/i2pd/releases/latest" <a href="https://github.com/PurpleI2P/i2pd/releases/latest"
id="dl-btn" target="_blank">Downloads</a> id="dl-btn" target="_blank">Downloads</a>
</div> </div>
<div id="all-dls" style="display: none;"> <div id="all-dls">
<p class="header-links"> <p class="header-links">
<a href="https://github.com/PurpleI2P/i2pd/releases/latest" <a href="https://github.com/PurpleI2P/i2pd/releases/latest"
data-l10n-id="header-dl-all" target="_blank"> data-l10n-id="header-dl-all" target="_blank">

View File

@ -1,15 +1,13 @@
function renderDownloadButton() { function renderDownloadButton() {
var downloadCount = 0, dl_btn = document.getElementById("dl-btn"), all_dls = document.getElementById("all-dls"); var downloadCount = 0, dl_btn = document.getElementById("dl-btn");
if (window.navigator.platform.toUpperCase().startsWith("WIN")) { if (window.navigator.platform.toUpperCase().startsWith("WIN")) {
dl_btn.innerText = document.webL10n.get("header-dl-btn-bundle", null, "Download I2PdBrowser"); dl_btn.innerText = document.webL10n.get("header-dl-btn-bundle", null, "Download I2PdBrowser");
dl_btn.setAttribute("href", "https://github.com/PurpleI2P/i2pdbrowser/releases/latest"); dl_btn.setAttribute("href", "https://github.com/PurpleI2P/i2pdbrowser/releases/latest");
all_dls.style.display = "block";
} else if (window.navigator.userAgent.toUpperCase().indexOf("ANDROID") !== -1) { } else if (window.navigator.userAgent.toUpperCase().indexOf("ANDROID") !== -1) {
dl_btn.innerText = document.webL10n.get("header.dl-btn-android", null, "Download for Android"); dl_btn.innerText = document.webL10n.get("header.dl-btn-android", null, "Download for Android");
dl_btn.setAttribute("href", droid_asset[0].browser_download_url); dl_btn.setAttribute("href", droid_asset[0].browser_download_url);
all_dls.style.display = "block";
} else { } else {
dl_btn.innerText = document.webL10n.get("header-dl-btn", null, "Downloads"); dl_btn.innerText = document.webL10n.get("header-dl-btn", null, "Downloads");