Forum:Script to hide "Read more" section on pages with navboxes

Something I whipped up and thought I'd share to help tame a stubborn feature. Adapted from Wikipedia's dynamic navigation bars code. Uses JavaScript to hide the "Read more" section if a page contains a table with "navbox" class.

Add to your MediaWiki:Common.js: function hideReadMore {   // iterate over all   or another name of your choosing? 01:17: Wed 16 May 2012
 * The code works perfectly. (I think.) Just sharing for anyone who wants to copy it. Rigel Kent 01:26, May 16, 2012 (UTC)


 * I'm sure it does work :) You'd obviously have no interest in posting code that didn't.  I don't doubt your coding skill in the slightest.  I just a) have never seen this problem (and would like to!) and b) don't understand why a JS solution would be better than just changing the CSS class to something which isn't affected by the problems associated with navbox.  01:42: Wed 16 May 2012