Difference between revisions of "MediaWiki:Common.js"

From Direct-Mind.Org

 
Line 15: Line 15:
*/
*/


/* ditto here
function categoryToTop() {
function categoryToTop() {
   var thebody = document.getElementById('contentTop');
   var thebody = document.getElementById('contentTop');
Line 24: Line 26:
   }
   }
}
}
*/

Latest revision as of 15:30, 9 January 2015

/* Any JavaScript here will be loaded for all users on every page load. */

/* ref: http://en.wikipedia.org/wiki/Help:User_style#Moving_categories_to_top
Moving categories to top[edit]
The following code moves the category box to the top of the article. Of course, you might want to apply some CSS to make it look prettier:
*/


/* doesn't work in Firefox
function catsattop() {
var cats = document.getElementById('catlinks');
var bc = document.getElementById('bodyContent');
bc.insertBefore(cats, bc.childNodes[0]);
}
*/


/* ditto here
function categoryToTop() {
  var thebody = document.getElementById('contentTop');
  var categories = document.getElementById('catlinks');

  if (categories != null) {
    categories.parentNode.removeChild (categories);
    thebody.parentNode.insertBefore(categories, thebody);
  }
}
*/