MediaWiki talk:Gadget-CategoryAboveBelowImage.js
Jump to navigation
Jump to search
This script, CategoryAboveBelowImage, is a JavaScript gadget which can be enabled or disabled in your Preferences. |
i18n | Gadget translations:
no internationalisation required: |
Upload form
[edit]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)
- done. Esby (talk) 20:18, 28 February 2010 (UTC)
Faster load + clone catsEdit request+
[edit]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)
- Done Awesome! Thank you! Zhuyifei1999 (talk) 16:05, 14 October 2016 (UTC)