MediaWiki:Common.js

// for security function esc(str) { if(str === "") { return ""; } else { return mw.html.escape(str); } }

// add page create date to the right of the shortdesc // uses Template:Createdate which transcludes to a #createdate element which has a data attribute var createDate = $("#createdate"); var createShow = createDate.length? ("Page created on " + createDate.data("date")):"Unknown page creation date"; $("#contentSub").after(' ' + esc(createShow) + " ");

// add heading icon var headingIcon = $("#headingicon").data("icon"); $("#firstHeading").prepend('');

// allows limited use of fieldset html tag in wikitext // var field; $(".fieldset").each(function(index, object) {	field = $(object);	field.html( '' + ' ' + esc(field.data("legend")) + " " + esc(field.data("content")) + " "	);	}); // deletes heading, shortdesc (content sub), and page name in title in main page if(mw.config.get("wgPageName") === "Political_History_Wiki:Main_page") { $("#firstHeading").css("display", "none"); $("#contentSub").css("display", "none"); document.title = "Political History Wiki"; }