diff --git a/docs/reST/_static/sections.js b/docs/reST/_static/sections.js index 3b1a9ed29c..7ff7f107ef 100644 --- a/docs/reST/_static/sections.js +++ b/docs/reST/_static/sections.js @@ -1,3 +1,22 @@ -const page = document - -page. \ No newline at end of file +function toggleSectionVisibility(section){ + document.getElementById(section).hidden = ! document.getElementById(section).hidden; + if (document.getElementById(section).hidden === true){ + items = localStorage.getItem('hidden'); + if (items !== null){ + if (!(items.includes(section))){ + items = items + '|' + section + '|'; + } + localStorage.setItem('hidden', items); + } else { + localStorage.setItem('hidden', section); + } + } else { + items = localStorage.getItem('hidden'); + if (items !== null){ + if (items.includes(section)){ + items = items.replace(section + '|', '') + } + localStorage.setItem('hidden', items); + } + } +} \ No newline at end of file diff --git a/docs/reST/themes/classic/elements.html b/docs/reST/themes/classic/elements.html index 261250ce1b..d501889dac 100644 --- a/docs/reST/themes/classic/elements.html +++ b/docs/reST/themes/classic/elements.html @@ -35,7 +35,7 @@
Window
Window
Drawing / Surface
Drawing / Surface
Events/Input
Events/Input
Collisions
Collisions
Music
Music
Other
Other