MediaWiki:Common.js: Difference between revisions
From CETAF ISTC Wiki
bwf>David Fichtmueller (added function to hide page title) |
(No difference)
|
Latest revision as of 12:00, 16 February 2016
/* Any JavaScript here will be loaded for all users on every page load. */
//this snippet will hide the page title if the Template:NO_TITLE is included in a page via {{NO_TITLE}}
$(document).ready(function() {
var noPageTitleToken= document.getElementsByClassName('mw_hide_page_title');
if(noPageTitleToken.length>0){
header = document.getElementById('firstHeading');
if(header){
header.style.display = "none";
}
}
});