MediaWiki:Common.js: Difference between revisions

From JP1 Remotes Wiki
Jump to navigationJump to search
No edit summary
No edit summary
 
Line 1: Line 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. */
(function() {
  const target = document.querySelector('.mw-wiki-logo');
  if (target) {
    target.removeAttribute('style');
  }
  const observer = new MutationObserver(mutations => {
    mutations.forEach(m => {
      if (m.type === 'attributes' && m.attributeName === 'style') {
        m.target.removeAttribute('style');
      }
    });
  });
  if (target) {
    observer.observe(target, { attributes: true });
  }
})();

Latest revision as of 16:28, 18 November 2025

/* Any JavaScript here will be loaded for all users on every page load. */