fix filters, add "Reset filters" button (#1405)

This commit is contained in:
SuperMaxusa 2025-09-14 01:25:29 +03:00 committed by GitHub
parent 4251ac1a9e
commit 464cddcbed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 2 deletions

View file

@ -57,7 +57,9 @@
<label><input type=checkbox> contains: demos</label> <label><input type=checkbox> contains: demos</label>
<label><input type=checkbox> contains: compilers</label> <label><input type=checkbox> contains: compilers</label>
<label><input type=checkbox> contains: web browsers</label>--> <label><input type=checkbox> contains: web browsers</label>-->
<div style="text-align: right; float: right"><a href="#setup">Skip to custom settings</a></div> <div style="text-align: right; float: right">
<a id="reset_filters">Reset filters</a> / <a href="#setup">Skip to custom settings</a>
</div>
<br style="clear: both"> <br style="clear: both">
</div> </div>
<hr> <hr>

View file

@ -1667,7 +1667,7 @@ function onload()
}; };
} }
const os_info = Array.from(document.querySelectorAll("#oses tbody tr")).map(element => const os_info = Array.from(document.querySelectorAll("#oses a.tr")).map(element =>
{ {
const [_, size_raw, unit] = element.children[1].textContent.match(/([\d\.]+)\+? (\w+)/); const [_, size_raw, unit] = element.children[1].textContent.match(/([\d\.]+)\+? (\w+)/);
let size = +size_raw; let size = +size_raw;
@ -1764,6 +1764,15 @@ function onload()
} }
} }
$("reset_filters").onclick = function()
{
for(const element of document.querySelectorAll("#filter input[type=checkbox]"))
{
element.checked = false;
}
update_filters();
};
function set_proxy_value(id, value) function set_proxy_value(id, value)
{ {
const elem = $(id); const elem = $(id);