mediawiki-extensions-Popups/resources/ext.popups/index.js

9 lines
358 B
JavaScript
Raw Normal View History

// Load Popups outside the critical rendering path (T176211) provided that touch events
// are not available in the browser. If touch events are enabled page previews will not load.
mw.requestIdleCallback( function () {
var isTouchDevice = 'ontouchstart' in document.documentElement;
if ( !isTouchDevice ) {
mw.loader.using( 'ext.popups.main' );
}
} );