« MediaWiki:Common.js » : différence entre les versions
Aller à la navigation
Aller à la recherche
Aucun résumé des modifications |
Aucun résumé des modifications |
||
| Ligne 1 : | Ligne 1 : | ||
$( function () { | |||
' | var panel = document.getElementById( 'mw-panel' ); | ||
var content = document.getElementById( 'content' ); | |||
if ( !panel || !content ) { return; } | |||
// Match the panel height to the content box | |||
function sync() { | |||
panel.style.minHeight = content.offsetHeight + 'px'; | |||
// | |||
function | |||
} | } | ||
sync(); | |||
// | // Recompute when the content box changes size | ||
if ( window.ResizeObserver ) { | |||
new ResizeObserver( sync ).observe( content ); | |||
} else { | |||
window.addEventListener( 'resize', sync ); | |||
} | } | ||
} ); | |||
Version du 30 juillet 2026 à 02:53
$( function () {
var panel = document.getElementById( 'mw-panel' );
var content = document.getElementById( 'content' );
if ( !panel || !content ) { return; }
// Match the panel height to the content box
function sync() {
panel.style.minHeight = content.offsetHeight + 'px';
}
sync();
// Recompute when the content box changes size
if ( window.ResizeObserver ) {
new ResizeObserver( sync ).observe( content );
} else {
window.addEventListener( 'resize', sync );
}
} );