মিডিয়াউইকি:Common.js/top.js

উইকিবই থেকে

লক্ষ্য করুন: প্রকাশ করার পর, পরিবর্তনগুলো দেখতে আপনাকে আপনার ব্রাউজারের ক্যাশে পরিষ্কার করার প্রয়োজন হতে পারে।

  • ফায়ারফক্স / সাফারি: পুনরায় লোড-এ ক্লিক করার সময় শিফট টিপে ধরে রাখুন, অথবা হয় Ctrl-F5 বা Ctrl-R টিপুন (ম্যাকে ⌘-R টিপুন)
  • গুগল ক্রোম: Ctrl-Shift-R (ম্যাকে ⌘-Shift-R) টিপুন
  • ইন্টারনেট এক্সপ্লোরার / এজ: Ctrl ধরে রাখা অবস্থায় Refresh-এ ক্লিক করুন, অথবা Ctrl-F5 টিপুন
  • অপেরা: Ctrl-F5 টিপুন।
/* Any JavaScript here will be loaded for all users on every page load. */
// Move icons and navigation to top of content area, which should place them right below the page title

mw.hook('wikipage.content').add(function($where) {
	var $content = mw.util.$content, $what = $where.find('.topicon').css('display', 'inline');
	
	if ( $what.length ) {
		$content.find(':header').eq(0).wrapInner('<span />').append( $('<span id="page-status" />').append($what) );
	}
	
	$what = $where.find('#top-navigation').remove().slice(0,1).addClass('subpages');
	if ( $what.length ) { $content.find('.subpages').eq(0).replaceWith($what); }
	
	$what = $where.find('#bottom-navigation').remove().slice(0,1);
	if ( $what.length ) { $where.append($what); }
});