added other os to selection list and old jquery for ie8

This commit is contained in:
root 2017-04-13 22:10:59 +02:00
parent c681286f43
commit 35082ac43c
3 changed files with 30 additions and 3 deletions

View file

@ -13,13 +13,14 @@
<!--[if lt IE 9]>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.js"></script>
<script type="text/javascript" src="js/jquery-1.12.4.min.js"></script>
<![endif]-->
</head>
<body>
<div id="content">
<header>
<img src="img/logo.png" id="logo" alt="Karihthy Címer" />
<img src="img/logo.png" id="logo" alt="Karinthy Címer" />
<h1>Karinthy Free WiFi - Útmutató</h1>
</header>
<section>
@ -43,6 +44,7 @@
<option value="android">Android</option>
<option value="mac">Mac OS X</option>
<option value="linux">Linux</option>
<option value="other">Egyéb</option>
</select>
<div id="os-specific"></div>
</section>

5
js/jquery-1.12.4.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -24,9 +24,11 @@ function selectOs( osDiv ) {
detectedOs = 'other';
}
var osSelect = checkOsString(detectedOs);
$('#' + detectedOs).addClass('detectedOs');
$('' + osDiv).load('os/' + detectedOs + '/howto.html');
$('#osSelector').val(detectedOs);
$('#osSelector').val(osSelect);
$('#osSelector').change(function () {
$('' + osDiv).load('os/' + $(this).val() + '/howto.html');
})
@ -40,6 +42,24 @@ function matches(osString, strings) {
return false;
}
function checkOsString(osString) {
var osSelect = osString;
switch(osString) {
case 'vista':
osSelect = 'win7';
break;
case 'win8':
osSelect = 'win10';
break;
case 'xp':
osSelect = 'other';
break;
default:
osSelect = osString;
}
return osSelect;
}
/*
'Windows 3.11' => 'Win16',
'Windows 95' => '(Windows 95)|(Win95)|(Windows_95)',