mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 09:46:12 +00:00
Auto-detect Linux and Ubuntu on the download page
This commit is contained in:
parent
6a9dc31d52
commit
40cb71be42
3 changed files with 94 additions and 1 deletions
|
@ -35,7 +35,10 @@ id: download
|
|||
<script type="text/javascript">
|
||||
var os='windows32';
|
||||
if(navigator.userAgent.indexOf('Mac')!=-1)var os='mac'
|
||||
else if(navigator.userAgent.indexOf('Linux')!=-1)var os='ubuntu';
|
||||
else if(navigator.userAgent.indexOf('Linux')!=-1){
|
||||
var os='linux';
|
||||
if(navigator.userAgent.indexOf('Ubuntu')!=-1)var os='ubuntu';
|
||||
}
|
||||
else if(navigator.userAgent.indexOf('WOW64')!=-1||navigator.userAgent.indexOf('Win64')!=-1)var os='windows64';
|
||||
var but=document.getElementById('downloadbutton');
|
||||
switch(os){
|
||||
|
@ -47,6 +50,10 @@ case 'windows32':
|
|||
but.getElementsByTagName('IMG')[0].src='/img/but_windows.svg';
|
||||
but.href='/bin/{{site.DOWNLOAD_VERSION}}/bitcoin-{{site.DOWNLOAD_VERSION}}-win32-setup.exe';
|
||||
break;
|
||||
case 'linux':
|
||||
but.getElementsByTagName('IMG')[0].src='/img/but_linux.png';
|
||||
but.href='/bin/{{site.DOWNLOAD_VERSION}}/bitcoin-{{site.DOWNLOAD_VERSION}}-linux.tar.gz';
|
||||
break;
|
||||
case 'ubuntu':
|
||||
but.getElementsByTagName('IMG')[0].src='/img/but_ubuntu.svg';
|
||||
but.href='https://launchpad.net/~bitcoin/+archive/bitcoin';
|
||||
|
|
BIN
img/but_linux.png
Normal file
BIN
img/but_linux.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
86
img/but_linux.svg
Normal file
86
img/but_linux.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 25 KiB |
Loading…
Add table
Add a link
Reference in a new issue