MediaWiki:Mobile.js:修订间差异
来自存档计划,Project Archive by Lakejason0
添加的内容 删除的内容
第24行: | 第24行: | ||
} |
} |
||
siteNoticeScroll('.siteNoticeScroll',5000); |
siteNoticeScroll('.siteNoticeScroll',5000); |
||
mw.loader.using(['mediawiki.util', 'mediawiki.cookie'], function () { |
|||
if (mw.cookie.get('__cf_mob_redir') === '0') { |
|||
window.location.href = $("#mw-mf-display-toggle").attr('href'); |
|||
}; |
|||
}); |
2021年12月5日 (日) 08:55的最新版本
/* 这里的任何JavaScript将为使用移动版网站的用户加载 */
/** 顶部公告 **/
/* From wjghj.cn under CC BY-NC-SA 4.0*/
function siteNoticeScroll(obj,interval) {
$(obj).animate({
height: 'show',
paddingTop: 'show',
marginTop: 'show',
paddingBottom: 'show',
marginBottom: 'show',
});
setInterval(function() {
$(obj).find('ul:first').animate({
marginTop: '-25px'
},
300,
function() {
$(this).css({
marginTop: '0px',
}).find('li:first').appendTo(this);
});
},
interval);
}
siteNoticeScroll('.siteNoticeScroll',5000);