MediaWiki:Common.js: Difference between revisions

Undo revision 37367 by Kinzo (talk)
(Created page with "/** * Keep code in MediaWiki:Common.js to a minimum as it is unconditionally * loaded for all users on every wiki page. If possible create a gadget that is * enabled by def...")
 
(Undo revision 37367 by Kinzo (talk))
Tag: Undo
 
(11 intermediate revisions by the same user not shown)
Line 14:
/* global mw, $, importStylesheet, importScript */
/* jshint strict:false, browser:true */
if (mw.config.get('wgPageName') === 'Mion Sonozaki') {
$(window).on('load.tabberhack', function() {
$('.tabberlive')[0].tabber.tabShow(1); // Switch to tab 2
$(window).off('load.tabberhack');
});
}
 
const tgln = document.querySelector("#siteSub")
const obsv = new IntersectionObserver(
([e]) => e.target.classList.toggle("stuck", e.intersectionRatio < 1),
{ threshold: [1] }
);
 
obsv.observe(tgln);
 
mw.loader.using( ['mediawiki.util', 'mediawiki.notify', 'jquery.client'], function () {
/* Begin of mw.loader.using callback */
 
/**
* Main Page layout fixes