2019-07-05 15:44:52 +02:00
|
|
|
$("#os").change(function(){
|
|
|
|
var os_name = $(this).find(":selected").val().replace(/(:|\.|\[|\]|,|=)/g, "\\$1").replace(/ /g,"_");
|
|
|
|
var first_browser_name = $("[id='" + os_name + "']").find('select option:first-child').val().replace(/(:|\.|\[|\]|,|=)/g, "\\$1").replace(/ /g,"_");
|
|
|
|
// Hide and disable everything
|
2021-01-20 20:54:37 +01:00
|
|
|
$("#os > option").removeAttr('selected');
|
2019-07-05 15:44:52 +02:00
|
|
|
$(".style-sub-1").hide();
|
|
|
|
$(".style-sub-1 > div > select").attr('disabled', true);
|
2021-01-20 20:54:37 +01:00
|
|
|
$(".style-sub-1 > div > select").removeAttr('selected');
|
2019-07-05 15:44:52 +02:00
|
|
|
$(".style-sub-2").hide();
|
|
|
|
$(".style-sub-2 > div > select").attr('disabled', true);
|
2021-01-20 20:54:37 +01:00
|
|
|
$(".style-sub-2 > div > select").removeAttr('selected');
|
2019-07-05 15:44:52 +02:00
|
|
|
|
|
|
|
$("[id='" + os_name + "']").show();
|
|
|
|
$("[id='" + os_name + "'] > div > select").removeAttr('disabled');
|
2021-01-20 20:54:37 +01:00
|
|
|
$("[id='" + os_name + "'] > div > select option:first").prop('selected',true);
|
2019-07-05 15:44:52 +02:00
|
|
|
$("[id='" + os_name + '_' + first_browser_name + "']").show();
|
|
|
|
$("[id='" + os_name + '_' + first_browser_name + "'] > div > select").removeAttr('disabled');
|
2021-01-20 20:54:37 +01:00
|
|
|
$("[id='" + os_name + '_' + first_browser_name + "'] > div > select option:first").prop('selected',true);
|
2019-07-05 15:44:52 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
$('select[name="browser"]').change(function(){
|
|
|
|
var browser_name = $(this).find(":selected").val().replace(/(:|\.|\[|\]|,|=)/g, "\\$1").replace(/ /g,"_");
|
|
|
|
var os_name = $(this).parent().parent().attr("id").replace(/(:|\.|\[|\]|,|=)/g, "\\$1").replace(/ /g,"_");
|
|
|
|
|
|
|
|
// Hide what makes sense
|
2021-01-20 20:54:37 +01:00
|
|
|
$(".style-sub-1 > div > select").removeAttr('selected');
|
2019-07-05 15:44:52 +02:00
|
|
|
$(".style-sub-2").hide();
|
|
|
|
$(".style-sub-2 > div > select").attr('disabled', true);
|
2021-01-20 20:54:37 +01:00
|
|
|
$(".style-sub-2 > div > select").removeAttr('selected');
|
2019-07-05 15:44:52 +02:00
|
|
|
|
|
|
|
$("[id='" + os_name + '_' + browser_name + "']").show();
|
|
|
|
$("[id='" + os_name + '_' + browser_name + "'] > div > select").removeAttr('disabled');
|
|
|
|
});
|
2020-07-17 18:39:50 +02:00
|
|
|
|
|
|
|
$('#btn-looking').click(function() {
|
|
|
|
$('#btn-looking').html('<span class="spinner-border spinner-border-sm mr-2" role="status" aria-hidden="true"></span>Looking...').addClass('disabled');
|
2020-08-07 17:06:25 +02:00
|
|
|
$('#long').fadeOut(0).delay(9000).fadeIn(100);
|
|
|
|
$('#too-long').fadeOut(0).delay(19000).fadeIn(100);
|
|
|
|
$('#way-too-long').fadeOut(0).delay(27000).fadeIn(100);
|
2020-07-17 18:39:50 +02:00
|
|
|
});
|