MediaWiki:Mobile.js: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
/* All JavaScript here will be loaded for users of the mobile site */ | /* All JavaScript here will be loaded for users of the mobile site */ | ||
mw.loader.using( 'mediawiki.util' ).then( function () { | mw.loader.using('mediawiki.util').then(function () { | ||
var header = document.querySelector('.minerva-header .branding-box'); | |||
if (header) { | |||
var img = document.createElement('img'); | |||
img.src = '/w/images/FormulaOneLogo.svg'; // Replace with your correct path | |||
img.alt = 'Formula One Wiki'; | |||
img.style.width = '120px'; // You can use %, em, or px | |||
img.style.height = 'auto'; // Maintain aspect ratio | |||
img.style.display = 'block'; | |||
img.style.margin = '0 auto'; | |||
header.innerHTML = ''; | |||
header.appendChild(img); | |||
} | |||
}); | }); |
Revision as of 09:10, 5 August 2025
/* All JavaScript here will be loaded for users of the mobile site */ mw.loader.using('mediawiki.util').then(function () { var header = document.querySelector('.minerva-header .branding-box'); if (header) { var img = document.createElement('img'); img.src = '/w/images/FormulaOneLogo.svg'; // Replace with your correct path img.alt = 'Formula One Wiki'; img.style.width = '120px'; // You can use %, em, or px img.style.height = 'auto'; // Maintain aspect ratio img.style.display = 'block'; img.style.margin = '0 auto'; header.innerHTML = ''; header.appendChild(img); } });