MediaWiki:Gadget-AggregateInterprojectLinks.js

/* $(function {	var spans = $('span.interProject a:first-child').clone;	if (spans.length === 0) return;
 * Generates a sidebar list of links to other projects from

// sort alphabetically function sortbylabel(a, b) { // get labels a = $(a).text; b = $(b).text; // return sort order if (a < b) return -1; if (a > b) return 1; return 0; }	spans.sort(sortbylabel); var newLinksWrapper = $(' ', {		'class': 'pBody body vector-menu-content',		'style': 'display:block'	}); $(spans).wrap('').parent .appendTo($('')).parent .appendTo(newLinksWrapper); var collapsed = mw.cookie.get("vector-nav-p-projects") == "false"; var projectBox = $(' ', {		addClass: 'vector-menu vector-menu-portal portlet portal ' + (collapsed ? "collapsed" : "expanded"),		id: 'p-projects'	}) .append($(' In other projects ')) .append(newLinksWrapper); $('#p-tb').after(projectBox); }); //