Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Filter TR Hotfix 3
  • Loading branch information
AlexDawsonUK committed Nov 8, 2025
commit 3f50337f76948fe601c05b4cd9e688a2c39069a5
19 changes: 10 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,9 @@
<dd>
<a href="#acknowledgments">See acknowledgments</a>
</dd> `); }}); }
</script>
<script>
// Role-based Labeling & Filter System: https://github.com/w3c/sustainableweb-wsg/issues/14
window.addEventListener("load", (event) => { addFilter(); });
function addFilter() {
const toc = document.querySelector('#toc');
const newItems = `
function htmlInsert() {
let toc = document.querySelector('#toc');
let newItems = `
<section id="switch" class="switch">
<form>
<label for="contents"><input type="radio" id="contents" name="switcher" checked>Contents</label>
Expand Down Expand Up @@ -167,7 +163,12 @@ <h2 class="introductory">Content Filters</h2>
</div>
</form>
</section>`;
toc.insertAdjacentHTML('afterbegin', newItems);
toc.insertAdjacentHTML('afterbegin', newItems); }
</script>
<script>
// Role-based Labeling & Filter System: https://github.com/w3c/sustainableweb-wsg/issues/14
window.addEventListener("load", (event) => { addFilter(); });
function addFilter() {
window.addEventListener('change', filterData); filterData(); }
function filterData() {
filterNote('mt', '[data-testable="machine"]');
Expand Down Expand Up @@ -331,7 +332,7 @@ <h2 class="introductory">Content Filters</h2>
noRecTrack: true,
shortName: "web-sustainability-guidelines",
latestVersion: "https://www.w3.org/TR/web-sustainability-guidelines/",
postProcess: [authorRef, addFilter]
postProcess: [authorRef, htmlInsert, addFilter]
}
</script>
</head>
Expand Down