MediaWiki:Gadget-dynamiccategories-noapi.js: Difference between revisions
No edit summary |
No edit summary Tag: Manual revert |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 349: | Line 349: | ||
// Make button active based on category view | // Make button active based on category view | ||
$('.catlist-selector .catbtn[title="' + mwPages.attr('class').slice(8) + '"]').addClass('active'); | if (mwPages[0]) $('.catlist-selector .catbtn[title="' + mwPages.attr('class').slice(8) + '"]').addClass('active'); | ||
$('.catlist-selector .catbtn').click($.proxy(catSelect, null)); | $('.catlist-selector .catbtn').click($.proxy(catSelect, null)); | ||