mirror of
https://github.com/minetest/contentdb.git
synced 2024-11-10 17:43:46 +01:00
22 lines
505 B
JavaScript
22 lines
505 B
JavaScript
// @author rubenwardy
|
|
// @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later
|
|
|
|
const min = $("#min_rel");
|
|
const max = $("#max_rel");
|
|
const none = $("#min_rel option:first-child").attr("value");
|
|
const warning = $("#minmax_warning");
|
|
|
|
function ver_check() {
|
|
const minv = min.val();
|
|
const maxv = max.val();
|
|
|
|
if (minv != none && maxv != none && minv > maxv) {
|
|
warning.show();
|
|
} else {
|
|
warning.hide();
|
|
}
|
|
}
|
|
|
|
min.change(ver_check);
|
|
max.change(ver_check);
|