SquareMioMiko(讨论 | 贡献) 无编辑摘要 标签:已被回退 |
无编辑摘要 标签:已被回退 |
||
第34行: | 第34行: | ||
})(); | })(); | ||
} | } | ||
}, | }, 10000); | ||
} | } |
2023年7月20日 (四) 00:18的版本
/* 这里的任何JavaScript将为所有用户在每次页面加载时加载。 */
/* SimpleMathJax支持预览设置 */
function waitForMathJax($content) {
if (typeof MathJax === 'undefined') {
setTimeout(function () { waitForMathJax($content); }, 1000);
} else {
MathJax.Hub.Queue(["Typeset", MathJax.Hub, $content[0]]).execute();
}
}
mw.hook('wikipage.content').add(waitForMathJax);
{
const scrollTextLists = document.querySelectorAll('.scroll-text-list>ul');
setInterval(function() {
for (var i = 0; i < scrollTextLists.length; ++i) {
(function() {
var list = scrollTextLists[i];
if (list.children.length < 2) {
return;
}
var repeat = 5;
var scrollBehavior = setInterval(function() {
if (repeat === 0) {
list.appendChild(list.firstElementChild);
list.style.marginTop = '0px';
clearInterval(scrollBehavior);
return;
}
--repeat
list.style.marginTop = (repeat - 5) * 5 + 'px';
}, 40)
})();
}
}, 10000);
}