Difere entre revisas de "MediaWiki:Common.js"
De Red Zambala
Zambala (discute | contribuis) No resoma de edita Eticeta: Reverted |
Zambala (discute | contribuis) No resoma de edita |
||
| (Un revisa media par la mesma usor no es mostrada) | |||
| Linia 1: | Linia 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ | /* Any JavaScript here will be loaded for all users on every page load. */ | ||
$(document).ready(function() { | |||
// Get the page title from the content header | |||
const pageTitle = $('.firstHeading').text(); | |||
// Get our placeholder in the navbar | |||
const navbarPageTitle = $('.navbar-page-title'); | |||
// Insert the page title into the navbar placeholder | |||
if (pageTitle && navbarPageTitle.length) { | |||
navbarPageTitle.html('<h1>' + pageTitle + '</h1>'); | |||
// Optionally hide the original title in the content area | |||
$('.firstHeading').hide(); | |||
} | |||
}); | }); | ||
Revisa la plu resente de 14:41, 18 maio 2025
/* Any JavaScript here will be loaded for all users on every page load. */
$(document).ready(function() {
// Get the page title from the content header
const pageTitle = $('.firstHeading').text();
// Get our placeholder in the navbar
const navbarPageTitle = $('.navbar-page-title');
// Insert the page title into the navbar placeholder
if (pageTitle && navbarPageTitle.length) {
navbarPageTitle.html('<h1>' + pageTitle + '</h1>');
// Optionally hide the original title in the content area
$('.firstHeading').hide();
}
});