Agregado boton OS
This commit is contained in:
parent
e70bd5e50d
commit
bc1e952c35
1 changed files with 33 additions and 1 deletions
34
index.html
34
index.html
|
@ -40,8 +40,40 @@
|
|||
</div>
|
||||
<div class="q">
|
||||
<h2>Office 7.5</h2>
|
||||
<a href="https://repos.libreoffice.gob.mx/windows/general/x86_64/Office_7.4.4.0_Win_x86-64_en-MX_es.msi" download class="download-button">Descargar</a>
|
||||
|
||||
<!--Selección de OS-->
|
||||
<!--button id="download-button">Descargar</button-->
|
||||
<download class="download-button" id="download-button">Descargar</a>
|
||||
|
||||
<script>
|
||||
var downloadButton = document.getElementById("download-button");
|
||||
var OSName = "Unknown OS";
|
||||
if (navigator.platform.indexOf("Win") != -1) OSName = "Windows";
|
||||
if (navigator.platform.indexOf("Mac") != -1) OSName = "MacOS";
|
||||
if (navigator.platform.indexOf("Linux") != -1) OSName = "Linux";
|
||||
|
||||
switch (OSName) {
|
||||
case "Windows":
|
||||
downloadButton.addEventListener("click", function() {
|
||||
window.location.href = "https://repos.libreoffice.gob.mx/windows/general/x86_64/Office_7.4.4.0_Win_x86-64_en-MX_es.msi";
|
||||
});
|
||||
break;
|
||||
case "MacOS":
|
||||
downloadButton.addEventListener("click", function() {
|
||||
window.location.href = "https://repos.libreoffice.gob.mx/macOS/";
|
||||
});
|
||||
break;
|
||||
case "Linux":
|
||||
downloadButton.addEventListener("click", function() {
|
||||
window.location.href = "https://repos.libreoffice.gob.mx/debs-rpm/";
|
||||
});
|
||||
break;
|
||||
default:
|
||||
downloadButton.disabled = true;
|
||||
break;
|
||||
}
|
||||
</script>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<br>
|
||||
|
|
Loading…
Reference in a new issue