MediaWiki:Common.js: Difference between revisions

No edit summary
Tag: Reverted
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 21: Line 21:
$(document).ready(function () {
$(document).ready(function () {
   if (mw.config.get('skin') === 'vector-2022') {
   if (mw.config.get('skin') === 'vector-2022') {
     if (!$('.mw-logo-tagline').length) {
    const logoContainer = document.querySelector('.vector-header-start #p-logo');
       $('<div class="mw-logo-tagline">The Free Encyclopedia</div>').insertAfter('.mw-logo');
     if (logoContainer && !document.getElementById('site-name-custom')) {
      const siteName = mw.config.get('wgSiteName') || 'Wikipedia';
 
       const nameDiv = document.createElement('div');
      nameDiv.id = 'site-name-custom';
      nameDiv.textContent = siteName;
 
      const taglineDiv = document.createElement('div');
      taglineDiv.id = 'real-tagline';
      taglineDiv.textContent = 'The Free Encyclopedia';
 
      logoContainer.appendChild(nameDiv);
      logoContainer.appendChild(taglineDiv);
     }
     }
   }
   }
});
});