MediaWiki:Monobook.css: Difference between revisions
From JP1 Remotes Wiki
Jump to navigationJump to search
The Robman (talk | contribs) No edit summary Tag: Reverted |
The Robman (talk | contribs) No edit summary Tag: Reverted |
||
| Line 1: | Line 1: | ||
/* All CSS here will be loaded for users of the MonoBook skin */ | /* All CSS here will be loaded for users of the MonoBook skin */ | ||
#mw-panel a[href*=" | /* Kill inline red borders/outlines/shadows on the Main page link in MonoBook */ | ||
#mw-panel a[href*="Main_page"], | |||
#n-mainpage-description > a { | |||
border: none !important; | border: none !important; | ||
outline: none !important; | |||
box-shadow: none !important; | |||
} | } | ||
document.addEventListener('DOMContentLoaded', function () { | |||
const mainLink = document.querySelector('#mw-panel a[href*="Main_page"], #n-mainpage-description > a'); | |||
if (mainLink) { | |||
mainLink.removeAttribute('style'); | |||
// Keep it clean if something re-injects the style | |||
const obs = new MutationObserver(muts => { | |||
muts.forEach(m => { | |||
if (m.type === 'attributes' && m.attributeName === 'style') { | |||
mainLink.removeAttribute('style'); | |||
} | |||
}); | |||
}); | |||
obs.observe(mainLink, { attributes: true }); | |||
} | |||
}); | |||
Revision as of 17:31, 18 November 2025
/* All CSS here will be loaded for users of the MonoBook skin */
/* Kill inline red borders/outlines/shadows on the Main page link in MonoBook */
#mw-panel a[href*="Main_page"],
#n-mainpage-description > a {
border: none !important;
outline: none !important;
box-shadow: none !important;
}
document.addEventListener('DOMContentLoaded', function () {
const mainLink = document.querySelector('#mw-panel a[href*="Main_page"], #n-mainpage-description > a');
if (mainLink) {
mainLink.removeAttribute('style');
// Keep it clean if something re-injects the style
const obs = new MutationObserver(muts => {
muts.forEach(m => {
if (m.type === 'attributes' && m.attributeName === 'style') {
mainLink.removeAttribute('style');
}
});
});
obs.observe(mainLink, { attributes: true });
}
});