MediaWiki:Common.js

/* Any JavaScript here will be loaded for all users on every page load. */

/* FONT */ (function(d) {   var config = {      kitId: 'rcf4jux',      scriptTimeout: 3000,      async: true    },    h=d.documentElement,t=setTimeout(function{h.className=h.className.replace(/\bwf-loading\b/g,"")+" wf-inactive";},config.scriptTimeout),tk=d.createElement("script"),f=false,s=d.getElementsByTagName("script")[0],a;h.className+=" wf-loading";tk.src='https://use.typekit.net/'+config.kitId+'.js';tk.async=true;tk.onload=tk.onreadystatechange=function{a=this.readyState;if(f||a&&a!="complete"&&a!="loaded")return;f=true;clearTimeout(t);try{Typekit.load(config)}catch(e){}};s.parentNode.insertBefore(tk,s)  })(document); /*Countdown.js*/ importArticles({   type: "script",    articles: [        "w:c:dev:MediaWiki:Countdown/code.js"    ] });

/*BackToTopButton.js*/ importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:BackToTopButton/code.js',    ] });

/*ReferencePopups.js*/ importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:ReferencePopups/code.js',    ] });

/*Tooltips.js*/ importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:Tooltips.js',    ] });

/*HTML5AudioPlayer.js*/ importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:HTML5AudioPlayer/code.js',    ] });

/*OGGPlayer.js*/ importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:MediaWiki:OggPlayer.js',    ] });

/*YoutubePlayer.js*/ importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:MediaWiki:YoutubePlayer/code.js',    ] });

/* BackToTop */ window.BackToTopModern = true;

/* For Template:Preview */ mw.hook('wikipage.content').add(function($content) {   $content.find('.episodepreview-video').each(function { var $this = $(this), data = $this.data, uri = new mw.Uri('https://www.youtube.com/embed/'), id = (data.id || '').trim, loop = ('' + data.loop).trim; if (data.loaded || id === '') { return; }       uri.path += id; uri.query = { autoplay: window.YoutubePlayerDisableAutoplay ? '0' : ('' + data.autoplay).trim, loop: loop, playlist: (loop === '1') ? id : '', start: ('' + data.start).trim, list: (data.list || '').trim, controls: 0, fs: 0, showinfo: 0, rel: 0, };       $this.html(mw.html.element('iframe', { width: ('' + data.width).trim, height: ('' + data.height).trim, src: uri.toString, frameborder: '0', allowfullscreen: 'true' }));       data.loaded = true; }); });

/* AddRailModule */ window.AddRailModule = [ {page: 'Template:BdayMonth', prepend: true}, 'Template:RailModule', ];

/* For card details on card icon hover */ window.tooltips_list = [ {       classname: 'card-icon-hover', parse: '' } ]; window.tooltips_config = { offsetX: 10, offsetY: 10 };