Skip to content

Commit

Permalink
Include arch get parameter only if not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
m417z committed Nov 12, 2022
1 parent d9431e0 commit 7ac75b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ <h2 id="main-title">Winbindex</h2>
<form>
<div class="row">
<div class="col-12 col-lg-6 offset-lg-3">
<input id="winbindex-arch" type="hidden" name="arch">
<input id="winbindex-arch" type="hidden" name="arch" disabled>

<!--select id="winbindex-file-select" name="file" class="form-control" required>
<option></option>
Expand Down
6 changes: 3 additions & 3 deletions winbindex.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ var globalFunctions = {};
var architecture = getParameterByName('arch');
var baseDataUrl = 'data';
if (architecture === 'arm64') {
$('#winbindex-arch').val(architecture);
$('#main-logo-link').attr('href', '?arch=arm64');
$('#winbindex-arch').val(architecture).prop('disabled', false);
$('#main-logo-link').prop('href', '?arch=arm64');
$('#main-logo-arch-badge').text('ARM64').removeClass('d-none');
$('#arch-links a[href="."]').removeClass('active');
$('#arch-links a[href="?arch=arm64"]').addClass('active');
Expand Down Expand Up @@ -230,7 +230,7 @@ var globalFunctions = {};
dataProvider: dataProvider,
onSelect: function (item) {
$('#winbindex-file-value').val(item.id);
$('#winbindex-file-select-container button[type=submit]').removeAttr('disabled');
$('#winbindex-file-select-container button[type=submit]').prop('disabled', false);
},
}).virtualselect('load');
}
Expand Down

0 comments on commit 7ac75b8

Please sign in to comment.