Just noticed that I forgot the "if" statement in my last example.
It should have been:
<script>
if (document.getElementById('page-login-signup') || document.getElementById('page-user-editadvanced')) {
document.getElementById('id_category_1').classList.remove("collapsed");
document.getElementById('id_category_1').classList.remove("collapsible");
document.getElementById('id_category_2').classList.remove("collapsed");
document.getElementById('id_category_2').classList.remove("collapsible");
}
</script>
Otherwise it would affect all pages.