mediawiki-skins-Vector/resources/skins.vector.js/legacyMessageBoxStyles.js
Jon Robson 3f7f355a2e Support legacy message box styles markup in JavaScript
Log a console warning to assist developers in migrating to the new
markup.

Bug: T360633
Change-Id: Iaa1a3fc3b910c5fe491459fc82c61bc329f3408d
2024-03-21 18:19:52 +00:00

12 lines
425 B
JavaScript

/**
* Checks if the page is using legacy message box styles
*/
module.exports = function () {
mw.requestIdleCallback( () => {
if ( document.querySelectorAll( '.mw-message-box:not(.cdx-message)' ).length ) {
mw.log.warn( `[T360668] A message box on this page is not using standard markup.
See https://doc.wikimedia.org/codex/latest/components/demos/message.html#markup-structure for more information.` );
}
} );
};