Contrary to what this comment says, this extension is not all-AJAX.
If you disable JavaScript in the browser, the subcategory counts
still show, so it is about half JS, half PHP. The JS part is the little
triangle you can click to load the list of subpages.
Change-Id: Ib25a13c57656b832e079627301f45b94bbd7e814
As having href causes arrows to be clickable before JavaScript
handler be loaded.
And since that disables visited logic, let's remove it.
Change-Id: Ice4c979d020342890fffd587bb5bee88fcc2a1ae
In 8e51ea4e3a CategoryTreeFunctions.php
was renamed to includes/CategoryTree.php. The class name was already
CategoryTree.
Change-Id: I2734c92810df0f653ae1ea402a149e42e7be08cb
The attribute data-ct-options already contains the mode and attribute
data-ct-mode is just redundant. The attribute data-ct-mode is now not
needed anymore and removed from the rendered HTML.
Change-Id: If261f3cdab6c55243e80dc2ef3caa884538b02bc
self closing tag <categorytree/> is invalid, but where encountered
the content of the tag is null.
Convert the null to empty string since CategoryTree::getTag require one
Bug: T378765
Change-Id: Iede4499952295b75a19bd05a5963caab00a9cadd
Implicitly marking parameter $... as nullable is deprecated in PHP
8.4. The explicit nullable type must be used instead.
Bug: T376276
Change-Id: I40bb7a0a02aaa467cbf0ae182adf5601ccbcb58e
After the first submit the URL contains &namespaces= with empty value.
This must be handled like a missing URL parameter.
Restore the default value '' removed in aec8d755.
Bug: T334289
Change-Id: I22d0eb334365472d411252f805d0d78a3cc265ab
The old code relies on CSS Janus to transform the default case outside
mw-content-{ltr,rtl} which can't be applied here so let's consider
this case also by relying only on dir attributes, the same direction
as T371265.
In future we can use &:dir( ltr ) and &:dir( rtl ) as we do in new
codes but as that isn't supported on all browsers we support.
Change-Id: Icf6b8e184ce981e6e8f16dafa9e14a19154ff0e3
Modules loaded with packageFiles are always executed in module scope
(with a closure), even in debug mode.
The behaviour of non-packageFiles debug mode is the only reason files
have closures.
https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript#Closure
Change-Id: I7ea2057029a63148a96333af7ff09a7885d2daa8