Author: happy_melon
Description:
Against r47169, implements CollapsibleTables from en.wiki in wikibits.js
This functionality is very much taken for granted, we forget that it's not actually available in core, and must be ported to every wiki that wishes to use it (which is a large number). I've rewritten the code from en.wiki to remove the external dependencies, it should now run on a clean MW installation using only the getElementsByClassName() function that's already in wikibits.js. The show/hide link titles are translatable (they use the same values by default as the show/hide links in the expanded watchlist, although of course the JS variables can be overwritten for more specific customisation).
Only thing that I'm not sure about is how pages will appear when this code is deployed if a wiki already has an implementation in their Common.js. I suspect double show/hide links will appear; but since AFAIK core JS executes before site JS before user JS, there's nothing that can be added to the core code to prevent the site code from acting (short of removing the "collapsible" classes, which might be a *little* extreme :D).
Patch needs thorough review (I've tested the JavaScript, but not the implementation).
Version: 1.15.x
Severity: enhancement
Attached: