欢迎来到奇葩栖息地!欢迎加入Discord服务器:XfrfHCzfbW欢迎加入QQ频道:r01m9y3iz6请先至特殊:参数设置验证邮箱后再进行编辑。特殊:参数设置挑选自己想要使用的小工具!不会编辑?请至这里学习Wikitext语法。

MediaWiki:Mobile.js:修订间差异

来自奇葩栖息地
添加的内容 删除的内容
(// Edit via InPageEdit)
(// Edit via InPageEdit)
 
第3行: 第3行:
/* MF broke the mobile styles loading in 1.31 */
/* MF broke the mobile styles loading in 1.31 */
mw.loader.load( 'mobile.site.styles' );
mw.loader.load( 'mobile.site.styles' );

/**
* Animated Site Announcement
*
* To show mutiple announcements.
*/
( function() {
var $content = $( '#localNotice' );
var advanceFrame = function( parentElem, parentSelector ) {
var curFrame = parentElem.querySelector( parentSelector + ' > .animated-active' );
$( curFrame ).removeClass( 'animated-active' );
var $nextFrame = $( curFrame && curFrame.nextElementSibling || parentElem.firstElementChild );
return $nextFrame.addClass( 'animated-active' );
};
setInterval( function() {
$content.find( '.animated' ).each( function() {
var $nextFrame = advanceFrame( this, '.animated' );
if ( $nextFrame.hasClass( 'animated-subframe' ) ) {
advanceFrame( $nextFrame[0], '.animated-subframe' );
}
} );
}, 2000 );
}() );

2021年10月1日 (五) 02:56的最新版本

/* 这里的任何JavaScript将为使用移动版网站的用户加载 */

/* MF broke the mobile styles loading in 1.31 */
mw.loader.load( 'mobile.site.styles' );