User:PerfektesChaos/js/catTreeToggling

 JavaScript gadget – toggle all branches of all CategoryTree elements in current page.

Usage

 * If your project has registered this as a gadget, just activate on your Preferences page.
 * Otherwise include the following line into your common.js, global.js etc.:

If you want to avoid unnecessary JavaScript execution you may limit loading to category pages only: Please note that there is also Special:CategoryTree which is excluded by this rule as well.

Functionality
Every CategoryTree can be expanded at various stages, or collapsed interactively.
 * If you loose track, you may want to close all trees immediately since you have opened too many.
 * If you want to explore sub-categories, it may be helpful to open all (first) sub-categories at once.

On pages with a CategoryTree element and activated catTreeToggling the toolbox will appear in the upper right corner (as demonstrated on this page). Just click a triangle.

Internationalization
A translation of this page may be offered.

Codes
de:User:PerfektesChaos/js/catTreeToggling