پرش به محتوا

مدیاویکی:Gadget-CategoryAboveAll.js: تفاوت میان نسخه‌ها

از دانشنامه علوم انسانی
imported>Jon (WMF)
maintenance: more info TypeError: bc is null
imported>Jon (WMF)
<maintenance> more info TypeError: Failed to execute 'insertBefore' on 'Node': parameter 1 is not of type 'Node'.
 
خط ۷: خط ۷:
   var cats = document.getElementById('catlinks');
   var cats = document.getElementById('catlinks');
   var bc = document.getElementById('bodyContent');
   var bc = document.getElementById('bodyContent');
   if(bc) bc.insertBefore(cats, bc.childNodes[0]);
   if(cats && bc) bc.insertBefore(cats, bc.childNodes[0]);
} );
} );

نسخهٔ کنونی تا ۱۹ ژوئیهٔ ۲۰۲۳، ساعت ۱۵:۴۵

//* by [[Commons:User:Ianezz|Ianezz]] ([[Commons:Commons:Village_pump/Archive/2009Sep#CSS_placement_of_categories]]), based on [[:wikinews:Help:User_style#Moving_categories_to_top]]

$(document).ready( function catsattop() {
  if ( mw.config.get( 'wgCanonicalNamespace' ) === 'Special') {
    return;
  }
  var cats = document.getElementById('catlinks');
  var bc = document.getElementById('bodyContent');
  if(cats && bc) bc.insertBefore(cats, bc.childNodes[0]);
} );