Difere entre revisas de "MediaWiki:Common.js"

De Red Zambala

No resoma de edita
Eticeta: Manual revert
No resoma de edita
 
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();
  }
});