Spaces:
Running
Running
File size: 1,441 Bytes
2003543 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
// main.js
$(document).ready(function() {
// Clr data
function openClrModal() {
document.getElementById('clr-data-model').style.display = 'flex';
}
function closeClrModal() {
document.getElementById('clr-data-model').style.display = 'none';
}
document.getElementById('clr-data-model').addEventListener('click', function(event) {
if (event.target.classList.contains('cancel-btn')) {
closeClrModal();
} else if (event.target.tagName === 'BUTTON' && event.target.textContent === 'Yes') {
localStorage.clear();
location.reload();
}
});
// Search Bar Functionality
$('#search-bar').on('keyup', function() {
var query = $(this).val().toLowerCase();
$('.filter-button').each(function() {
var buttonText = $(this).text().toLowerCase();
if (buttonText.indexOf(query) > -1) {
$(this).show();
} else {
$(this).hide();
}
});
});
// Show Modded Clients Functionality
function updateShowModded() {
var isChecked = $("#showModded").is(":checked");
if (isChecked) {
$("#moddedButtons").show();
} else {
$("#moddedButtons").hide();
}
}
$("#showModded").on("change", updateShowModded);
updateShowModded();
});
|