mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-28 09:30:17 +00:00
Merge "Apply body styles to mw teleport target"
This commit is contained in:
commit
618ec9249d
|
@ -10,7 +10,8 @@ const languageButton = require( './languageButton.js' ),
|
||||||
dropdownMenus = require( './dropdownMenus.js' ).dropdownMenus,
|
dropdownMenus = require( './dropdownMenus.js' ).dropdownMenus,
|
||||||
watchstar = require( './watchstar.js' ).init,
|
watchstar = require( './watchstar.js' ).init,
|
||||||
setupIntersectionObservers = require( './setupIntersectionObservers.js' ),
|
setupIntersectionObservers = require( './setupIntersectionObservers.js' ),
|
||||||
menuTabs = require( './menuTabs.js' );
|
menuTabs = require( './menuTabs.js' ),
|
||||||
|
teleportTarget = /** @type {HTMLElement} */require( /** @type {string} */ ( 'mediawiki.page.ready' ) ).teleportTarget;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wait for first paint before calling this function. That's its whole purpose.
|
* Wait for first paint before calling this function. That's its whole purpose.
|
||||||
|
@ -97,6 +98,8 @@ function main( window ) {
|
||||||
pinnableElement.initPinnableElement();
|
pinnableElement.initPinnableElement();
|
||||||
// Initializes the TOC and sticky header, behaviour of which depend on scroll behaviour.
|
// Initializes the TOC and sticky header, behaviour of which depend on scroll behaviour.
|
||||||
setupIntersectionObservers.main();
|
setupIntersectionObservers.main();
|
||||||
|
// Apply body styles to teleported elements
|
||||||
|
teleportTarget.classList.add( 'vector-body' );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue