MediaWiki:Gadget-dynamiccategories-noapi.js: Difference between revisions

No edit summary
 
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 8: Line 8:




defaultCategoryView = 'Gallery'; // Choose from 'Classic' , 'Dynamic' or 'Gallery' --- First letter capital, with single quotes
defaultCategoryView = 'Dynamic'; // Choose from 'Classic' , 'Dynamic' or 'Gallery' --- First letter capital, with single quotes


galleryCatStyle = 'Compact'; // 'Normal' , 'Compact' or 'Compacter'
galleryCatStyle = 'Compact'; // 'Normal' , 'Compact' or 'Compacter'
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));
Line 467: Line 467:
     }
     }
}
}
// [[Category:Scripts]]
// [[Category:Admin]]