« MediaWiki:Common.js » : différence entre les versions
Apparence
Page créée avec « →Tout JavaScript présent ici sera exécuté par tous les utilisateurs à chaque chargement de page. : mw.loader.using('mediawiki.util', function() { var root = document.documentElement; root.style.setProperty('--background-color-base', '#000', 'important'); root.style.setProperty('--background-color-neutral-subtle', '#111', 'important'); root.style.setProperty('--background-color-page-container', '#000', 'important'); root.style.setProperty('--color... » |
Aucun résumé des modifications |
||
| Ligne 2 : | Ligne 2 : | ||
mw.loader.using('mediawiki.util', function() { | mw.loader.using('mediawiki.util', function() { | ||
var root = document.documentElement; | var root = document.documentElement; | ||
// Fond et texte | |||
root.style.setProperty('--background-color-base', '#000', 'important'); | root.style.setProperty('--background-color-base', '#000', 'important'); | ||
root.style.setProperty('--background-color-neutral-subtle', '#111', 'important'); | root.style.setProperty('--background-color-neutral-subtle', '#111', 'important'); | ||
| Ligne 8 : | Ligne 9 : | ||
document.body.style.background = '#000'; | document.body.style.background = '#000'; | ||
document.body.style.color = '#fff'; | document.body.style.color = '#fff'; | ||
// Couleurs d'accent et liens | |||
root.style.setProperty('--color-progressive', '#00ff5a', 'important'); // Liens, boutons principaux | |||
root.style.setProperty('--color-link', '#00ff5a', 'important'); | |||
root.style.setProperty('--color-link--visited', '#00ff5a', 'important'); | |||
root.style.setProperty('--color-link--hover', '#fff', 'important'); | |||
root.style.setProperty('--color-link--active', '#00ff5a', 'important'); | |||
root.style.setProperty('--color-interactive', '#00ff5a', 'important'); | |||
root.style.setProperty('--color-interactive--hover', '#fff', 'important'); | |||
root.style.setProperty('--color-interactive--active', '#00ff5a', 'important'); | |||
root.style.setProperty('--color-button', '#00ff5a', 'important'); | |||
root.style.setProperty('--color-button--hover', '#fff', 'important'); | |||
root.style.setProperty('--color-button--active', '#00ff5a', 'important'); | |||
}); | }); | ||
Version du 27 mai 2025 à 17:23
/* Tout JavaScript présent ici sera exécuté par tous les utilisateurs à chaque chargement de page. */
mw.loader.using('mediawiki.util', function() {
var root = document.documentElement;
// Fond et texte
root.style.setProperty('--background-color-base', '#000', 'important');
root.style.setProperty('--background-color-neutral-subtle', '#111', 'important');
root.style.setProperty('--background-color-page-container', '#000', 'important');
root.style.setProperty('--color-base', '#fff', 'important');
document.body.style.background = '#000';
document.body.style.color = '#fff';
// Couleurs d'accent et liens
root.style.setProperty('--color-progressive', '#00ff5a', 'important'); // Liens, boutons principaux
root.style.setProperty('--color-link', '#00ff5a', 'important');
root.style.setProperty('--color-link--visited', '#00ff5a', 'important');
root.style.setProperty('--color-link--hover', '#fff', 'important');
root.style.setProperty('--color-link--active', '#00ff5a', 'important');
root.style.setProperty('--color-interactive', '#00ff5a', 'important');
root.style.setProperty('--color-interactive--hover', '#fff', 'important');
root.style.setProperty('--color-interactive--active', '#00ff5a', 'important');
root.style.setProperty('--color-button', '#00ff5a', 'important');
root.style.setProperty('--color-button--hover', '#fff', 'important');
root.style.setProperty('--color-button--active', '#00ff5a', 'important');
});