欢迎来到奇葩栖息地!欢迎加入Discord服务器:XfrfHCzfbW。请先至特殊:参数设置验证邮箱后再进行编辑。在特殊:参数设置挑选自己想要使用的小工具!不会编辑?请至这里学习Wikitext语法。
MediaWiki:Mobile.js:修订间差异
来自奇葩栖息地
添加的内容 删除的内容
SkyEye FAST(讨论 | 贡献) (// Edit via InPageEdit) |
SkyEye FAST(讨论 | 贡献) (// 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 ); |
|||
}() ); |