mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-27 17:41:50 +00:00
## About The Pull Request Prettier (an auto formatter) is set to only run within the tgui folder currently. This removes that limitation, allowing it to automatically format all supported files in the repo (.js, .html, .yml [etc](https://prettier.io/docs/)) I made a few exceptions for bundled and generated files ## Why It's Good For The Game I'm of the opinion that code should look uniform and am lazy enough to want CTRL-S to format files without having to think beyond that ## Changelog
21 lines
630 B
JavaScript
21 lines
630 B
JavaScript
function toggle_other_checkboxes(source, copycats_str, our_index_str) {
|
|
const copycats = parseInt(copycats_str);
|
|
const our_index = parseInt(our_index_str);
|
|
for (var i = 1; i <= copycats; i++) {
|
|
if (i === our_index) {
|
|
continue;
|
|
}
|
|
document.getElementById(source.id.slice(0, -1) + i).checked =
|
|
source.checked;
|
|
}
|
|
}
|
|
|
|
function header_click_all_checkboxes(source) {
|
|
var checkboxes = document.getElementsByClassName(source.name);
|
|
for (var i = 0, n = checkboxes.length; i < n; i++) {
|
|
if (checkboxes[i].checked != source.checked && checkboxes[i] != source) {
|
|
checkboxes[i].click();
|
|
}
|
|
}
|
|
}
|