Difere entre revisas de "MediaWiki:Common.js"

De Red Zambala

No resoma de edita
No resoma de edita
 
(3 revisas 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() {
$(function () {
   // Get the page title from the content header
   // Match external link in sidebar
  const pageTitle = $('.firstHeading').text();
   $('#n-Red-Zambala a[href^="https://redzambala.com"]').addClass('redzambala-link');
 
  // 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();
  }
});