MediaWiki talk:Gadget-CategoryAboveAll.js

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search


Edit request[edit]

Please see MediaWiki talk:Gadget-CategoryAboveBelowImage.js. -- User:Docu at 13:02, 27 February 2010 (UTC)[reply]

done. Esby (talk) 20:18, 28 February 2010 (UTC)[reply]

Null check for bodyContent[edit]

{{Editprotected}} Please add a null check for bc. Otherwise, it will throw in skins without bodyContent, including CologneBlue and Modern. Replace:

  bc.insertBefore(cats, bc.childNodes[0]);

with:

if ( bc !== null ) {
  bc.insertBefore(cats, bc.childNodes[0]);
}

mw.util.$content could potentially be used if it's null, or jQuery, etc. but the above will at least stop it from throwing an exception. Superm401 - Talk 19:06, 4 March 2014 (UTC)[reply]

✓ Done /Lokal_Profil 13:12, 5 March 2014 (UTC)[reply]