v0.1.1
Go quality gates / test (push) Waiting to run

This commit is contained in:
Mateusz Gruszczyński committed 2026-11-30 14:44:28 +01:00
1 parent 8c4d463f1e
commit de13d851a8
75 files changed
+4656 -442

No files matched your search

+9
View File
@@ -9,6 +9,15 @@
cover?.addEventListener('click', close);
document.addEventListener('keydown', e => {if(e.key === 'Escape') close();});
document.querySelectorAll('.notice-dismiss').forEach(el => el.addEventListener('click', () => el.closest('.notice')?.remove()));
// Strict CSP disallows inline onchange handlers. The server selector
// submits the CSRF-protected form immediately on selection change.
document.querySelectorAll('select[data-switch-server]').forEach(select => {
select.addEventListener('change', () => {
if (!select.form || !select.value) return;
if (typeof select.form.requestSubmit === 'function') select.form.requestSubmit();
else select.form.submit();
});
});
document.querySelectorAll('.bar-fill[data-count]').forEach(bar => {
const count = Number(bar.dataset.count), total = Number(bar.dataset.total);
const ratio = Number.isFinite(count) && Number.isFinite(total) && total > 0 ? 100 * count / total : 0;