MediaWiki talk:Gadget-CategoryAboveBelowImage.js

Latest comment: 7 years ago by Zhuyifei1999 in topic Faster load + clone catsEdit request+


Upload form

edit

{{Editprotected}}

As discussed, please update to the following:

source
//* by [[User:Ianezz]] ([[Commons:Village_pump/Archive/2009Sep#CSS_placement_of_categories]]), based on [[:wikinews:Help:User_style#Moving_categories_to_top]]
 
function catsattop() {
  if ( wgCanonicalNamespace=="Special") return;
  var cats = document.getElementById('catlinks');
  var bc = document.getElementById('bodyContent');
  var f  = document.getElementById('file');
  if (f != null) { f.appendChild(cats); } else { bc.insertBefore(cats, bc.childNodes[0]); }
}
hookEvent ('load', catsattop);

For MediaWiki:Gadget-CategoryAboveAll.js, please use the following:

source
//* by [[User:Ianezz]] ([[Commons:Village_pump/Archive/2009Sep#CSS_placement_of_categories]]), based on [[:wikinews:Help:User_style#Moving_categories_to_top]]
 
function catsattop() {
  if ( wgCanonicalNamespace=="Special") return;
  var cats = document.getElementById('catlinks');
  var bc = document.getElementById('bodyContent');
  bc.insertBefore(cats, bc.childNodes[0]);
}
 
hookEvent ('load', catsattop);

Thanks. -- User:Docu at 13:02, 27 February 2010 (UTC)Reply

done. Esby (talk) 20:18, 28 February 2010 (UTC)Reply

Faster load + clone catsEdit request+

edit

{{Edit request}}

I've updated the script with keeping the original catlist and clones the other. Because it is sometimes annoying, the catlist is missing and the load time was bad (if you only want check cats, document.ready = jQuery is not anymore needed). User: Perhelion 09:38, 8 September 2016 (UTC)Reply

  Done Awesome! Thank you! Zhuyifei1999 (talk) 16:05, 14 October 2016 (UTC)Reply
Return to "Gadget-CategoryAboveBelowImage.js" page.