Difere entre revisas de "MediaWiki:Common.js"

De Red Zambala

Created page with "Any JavaScript here will be loaded for all users on every page load.: document.addEventListener("DOMContentLoaded", function () { document.querySelectorAll('.navbar-nav li').forEach(function (li) { const a = li.querySelector('a[href^="http"][href*="redzambala.com"]'); if (a) { li.style.display = 'none'; } }); });"
 
No resoma de edita
 
(5 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() {
document.addEventListener("DOMContentLoaded", function () {
   // Get the page title from the content header
   document.querySelectorAll('.navbar-nav li').forEach(function (li) {
  const pageTitle = $('.firstHeading').text();
    const a = li.querySelector('a[href^="http"][href*="redzambala.com"]');
 
    if (a) {
  // Get our placeholder in the navbar
      li.style.display = 'none';
  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();
  }
});