MediaWiki:Mobile.js:修订间差异
跳转到导航
跳转到搜索
无编辑摘要 标签:移动版编辑 移动版网页编辑 |
无编辑摘要 标签:移动版编辑 移动版网页编辑 |
||
| 第3行: | 第3行: | ||
for MW-1.34.2 with MobileFrontend and MinervaNeue | for MW-1.34.2 with MobileFrontend and MinervaNeue | ||
Just replace span text and href to add links */ | Just replace span text and href to add links */ | ||
mw.loader.using( | mw.loader.using('https://jjjstudent.com/extensions/FontAwesome/res/fontawesome/js//fontawesome.js'); | ||
mw.loader.using( | mw.loader.using('https://jjjstudent.com/extensions/FontAwesome/res/fontawesome/js//solid.js'); | ||
mw.loader.using('mobile.site.styles'); | mw.loader.using('mobile.site.styles'); | ||
2025年9月14日 (日) 18:36的版本
/* 这里的任何JavaScript将为使用移动版网站的用户加载 */
/* Add to MediaWiki:Mobile.js for custom Mobile Menu links
for MW-1.34.2 with MobileFrontend and MinervaNeue
Just replace span text and href to add links */
mw.loader.using('https://jjjstudent.com/extensions/FontAwesome/res/fontawesome/js//fontawesome.js');
mw.loader.using('https://jjjstudent.com/extensions/FontAwesome/res/fontawesome/js//solid.js');
mw.loader.using('mobile.site.styles');
if ($('.menu ul:first').length) {
console.log("mobile menu exists");
$('.menu ul:first').after(
'<ul id="p-otherlink" class="toggle-list__list"> \
<li class="toggle-list-item"> \
<a class="toggle-list-item__anchor menu__item--link1" href="https://discuss.jjjstudent.com" data-mw="interface"> \
<i class="fa fa-users" style="width: 20px; height: 20px; color: var(--color-subtle,#54595d); margin-right: 8px; line-height: inherit; text-align: center;"></i> \
<span class="toggle-list-item__label">论坛</span> \
</a> \
</li> \
<li class="toggle-list-item"> \
<a class="toggle-list-item__anchor menu__item--link2" href="https://old.jjjstudent.com" data-mw="interface"> \
<i class="fa fa-archive" style="width: 20px; height: 20px; color: var(--color-subtle,#54595d); margin-right: 8px; line-height: inherit; text-align: center;"></i> \
<span class="toggle-list-item__label">文档存档</span> \
</a> \
</li> \
</ul>'
);
};
if ($('.mw-collapsible')[0]) mw.loader.using('jquery.makeCollapsible').then(function () {
//console.debug('jquery.makeCollapsible is loaded.');
$('.mw-collapsible').makeCollapsible();
});