mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-09-23 18:28:34 +00:00
Merge "Use document.body and document.documentElement as jQuery selector"
This commit is contained in:
commit
c5fc4d05df
|
@ -13,7 +13,7 @@ function testScrollLeftStyle() {
|
|||
dir: 'rtl',
|
||||
style: 'font-size: 14px; width: 4px; height: 1px; position: absolute; top: -1000px; overflow: scroll;'
|
||||
} ).text( 'ABCD' );
|
||||
$definer.appendTo( 'body' );
|
||||
$definer.appendTo( document.body );
|
||||
definer = $definer[ 0 ];
|
||||
if ( definer.scrollLeft > 0 ) {
|
||||
// Safari, Chrome
|
||||
|
|
|
@ -135,8 +135,7 @@
|
|||
// set A-B test class.
|
||||
// When wgMinervaPageIssuesNewTreatment is the default this can be removed.
|
||||
if ( newTreatmentEnabled ) {
|
||||
// eslint-disable-next-line no-jquery/no-global-selector
|
||||
$( 'html' ).addClass( 'issues-group-B' );
|
||||
$( document.documentElement ).addClass( 'issues-group-B' );
|
||||
}
|
||||
|
||||
if ( CURRENT_NS === NS_TALK || CURRENT_NS === NS_CATEGORY ) {
|
||||
|
|
|
@ -149,8 +149,7 @@ module.exports = function ( mobile ) {
|
|||
.text( mw.message( 'minerva-talk-full-page' ).text() )
|
||||
.on( 'click', function () {
|
||||
restoreSectionHeadings();
|
||||
// eslint-disable-next-line no-jquery/no-global-selector
|
||||
$( 'body' ).removeClass( 'skin-minerva--talk-simplified' );
|
||||
$( document.body ).removeClass( 'skin-minerva--talk-simplified' );
|
||||
$( this ).remove();
|
||||
// send user back up to top of page so they don't land awkwardly in
|
||||
// middle of page when it expands
|
||||
|
@ -233,8 +232,8 @@ module.exports = function ( mobile ) {
|
|||
* @return {boolean}
|
||||
*/
|
||||
function isSimplifiedViewEnabled() {
|
||||
// eslint-disable-next-line no-jquery/no-class-state, no-jquery/no-global-selector
|
||||
return $( 'body' ).hasClass( SKIN_MINERVA_TALK_SIMPLIFIED_CLASS );
|
||||
// eslint-disable-next-line no-jquery/no-class-state
|
||||
return $( document.body ).hasClass( SKIN_MINERVA_TALK_SIMPLIFIED_CLASS );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue