Can I use JavaScript in the sidebar?
When I read
It looks like I cannot do it. It supports only Wiki Markup, macro calls and working with selectors. There might be an option using the HTML MAcro, according to Unknown Macro: html when used in Sidebar.
So can I use the HTML Macro to manipulate the sidebar?
I found some code examples in Creating a Custom Page Tree macro.
I want to create a page tree as done by the Page Tree Macro but filter pages based on page labels. There is a similar question but it is unsolved: Confluence: Is there a Page Tree macro which uses labels as a filter