« MediaWiki:Common.js » : différence entre les versions
Apparence
Aucun résumé des modifications |
Aucun résumé des modifications |
||
| Ligne 95 : | Ligne 95 : | ||
color: #000 !important; | color: #000 !important; | ||
border-color: #00ff5a !important; | border-color: #00ff5a !important; | ||
} | |||
`; | |||
var style = document.createElement('style'); | |||
style.innerHTML = css; | |||
document.head.appendChild(style); | |||
}); | |||
mw.loader.using('mediawiki.util', function() { | |||
var css = ` | |||
pre, | |||
.mw-code, | |||
.mw-highlight, | |||
.mw-code pre, | |||
pre.mw-code, | |||
pre.prettyprint, | |||
pre.source, | |||
pre.plain, | |||
pre.diff, | |||
pre#wpTextbox1, | |||
textarea, | |||
textarea#wpTextbox1, | |||
.CodeMirror, | |||
.CodeMirror-lines, | |||
.ve-ce-documentNode { | |||
background: #111 !important; | |||
color: #fff !important; | |||
font-family: 'Fira Mono', 'Consolas', 'Monaco', 'Courier New', monospace !important; | |||
border-radius: 4px !important; | |||
border: 1px solid #222 !important; | |||
} | |||
.CodeMirror-cursor { | |||
border-left: 2px solid #fff !important; | |||
} | |||
.CodeMirror-gutters { | |||
background: #111 !important; | |||
color: #888 !important; | |||
border-right: 1px solid #222 !important; | |||
} | |||
.ve-ce-documentNode { | |||
background: #111 !important; | |||
color: #fff !important; | |||
} | } | ||
`; | `; | ||
Version du 27 mai 2025 à 17:38
/* 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');
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');
// Boutons radio et checkbox Codex/Codex
root.style.setProperty('--cdx-color-accent', '#00ff5a', 'important');
root.style.setProperty('--cdx-color-accent--hover', '#00ff5a', 'important');
root.style.setProperty('--cdx-color-accent--active', '#00ff5a', 'important');
root.style.setProperty('--cdx-color-accent--focus', '#00ff5a', 'important');
root.style.setProperty('--cdx-color-accent--selected', '#00ff5a', 'important');
root.style.setProperty('--cdx-color-accent--checked', '#00ff5a', 'important');
root.style.setProperty('--cdx-color-accent--pressed', '#00ff5a', 'important');
root.style.setProperty('--cdx-color-accent--visited', '#00ff5a', 'important');
root.style.setProperty('--cdx-color-accent--disabled', '#00ff5a', 'important');
root.style.setProperty('--cdx-color-accent--readonly', '#00ff5a', 'important');
});
mw.loader.using('mediawiki.util', function() {
var css = `
.vector-pinnable-header-toggle-button {
display: inline-block !important;
background: #000 !important;
border: 2px solid #00ff5a !important;
color: #00ff5a !important;
padding: 4px 8px !important;
font-size: 0.75rem !important;
border-radius: 2px !important;
cursor: pointer !important;
transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.vector-pinnable-header-toggle-button:hover,
.vector-pinnable-header-toggle-button:focus {
background: #00ff5a !important;
color: #000 !important;
border-color: #00ff5a !important;
}
`;
var style = document.createElement('style');
style.innerHTML = css;
document.head.appendChild(style);
});
mw.loader.using('mediawiki.util', function() {
var css = `
/* Boutons d'épinglage/désépinglage Vector */
.vector-pinnable-header-toggle-button {
display: inline-block !important;
background: #000 !important;
border: 1px solid #00ff5a !important;
color: #00ff5a !important;
padding: 4px 8px !important;
font-size: 0.75rem !important;
border-radius: 2px !important;
cursor: pointer !important;
transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.vector-pinnable-header-toggle-button:hover,
.vector-pinnable-header-toggle-button:focus {
background: #00ff5a !important;
color: #000 !important;
border-color: #00ff5a !important;
}
/* Boutons de recherche et boutons Codex */
.cdx-button,
.cdx-search-input__end-button {
background: #000 !important;
border: 1px solid #00ff5a !important;
color: #00ff5a !important;
transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.cdx-button:hover,
.cdx-button:focus,
.cdx-search-input__end-button:hover,
.cdx-search-input__end-button:focus {
background: #00ff5a !important;
color: #000 !important;
border-color: #00ff5a !important;
}
`;
var style = document.createElement('style');
style.innerHTML = css;
document.head.appendChild(style);
});
mw.loader.using('mediawiki.util', function() {
var css = `
pre,
.mw-code,
.mw-highlight,
.mw-code pre,
pre.mw-code,
pre.prettyprint,
pre.source,
pre.plain,
pre.diff,
pre#wpTextbox1,
textarea,
textarea#wpTextbox1,
.CodeMirror,
.CodeMirror-lines,
.ve-ce-documentNode {
background: #111 !important;
color: #fff !important;
font-family: 'Fira Mono', 'Consolas', 'Monaco', 'Courier New', monospace !important;
border-radius: 4px !important;
border: 1px solid #222 !important;
}
.CodeMirror-cursor {
border-left: 2px solid #fff !important;
}
.CodeMirror-gutters {
background: #111 !important;
color: #888 !important;
border-right: 1px solid #222 !important;
}
.ve-ce-documentNode {
background: #111 !important;
color: #fff !important;
}
`;
var style = document.createElement('style');
style.innerHTML = css;
document.head.appendChild(style);
});