mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-27 11:58:53 -06:00
fix: hide filter boxes and picker until wired
A filter box read "Filter Options41 rows" in the page text and the file picker an empty "Setup Choose a setup": both do nothing without the script. They are written hidden, keep their room so nothing moves, and site.ts or the picker's script shows them. The count describes the input and is spaced from the label. One box markup for the build and the generator, and the Markdown copy skips hidden chrome.
This commit is contained in:
1 parent
fda6845289
commit
c916503958
10 files changed
+65
-25
No files matched your search
@@ -158,6 +158,14 @@ const labelCells = (table: HTMLTableElement) => {
|
||||
}
|
||||
};
|
||||
|
||||
// Every filter box is written `hidden` (siteentries.filter_box,
|
||||
// rehype-stack-tables.mjs): it filters only once this script runs, so a
|
||||
// reader without it never meets a field that does nothing. The box keeps
|
||||
// its room while hidden (retrobios.css), so showing it moves nothing.
|
||||
const showFilters = () => {
|
||||
for (const box of document.querySelectorAll<HTMLElement>('.rb-table-filter[hidden]')) box.hidden = false;
|
||||
};
|
||||
|
||||
const enhanceTables = () => {
|
||||
const tables = [...document.querySelectorAll<HTMLTableElement>('.sl-markdown-content table')];
|
||||
const enhance = (table: HTMLTableElement) => {
|
||||
@@ -1450,6 +1458,7 @@ resolveFileAddress();
|
||||
followMovedCard();
|
||||
openTargetBlock();
|
||||
addEventListener('hashchange', openTargetBlock);
|
||||
showFilters();
|
||||
enhanceTables();
|
||||
breakPaths();
|
||||
hashSearch();
|
||||
|
||||
Reference in new issue
Block a user