LLWiki正在建设中,欢迎加入我们

“MediaWiki:Mobile.js”的版本间差异

来自LLWiki
跳转到导航 跳转到搜索
标签移动版网页编辑 移动版编辑
第9行: 第9行:
console.log("mobile menu exists");
console.log("mobile menu exists");
clearInterval(timer);
clearInterval(timer);
$('.menu ul:first').append('<li><a href="/zh/special:recentchanges" class="mw-ui-icon mw-ui-icon-before"><span>最近更改</span></a></li>');
$('.menu ul:first').append('<li><a href="/zh/special:recentchanges" class="mw-ui-icon mw-ui-icon-before"><span>最近更改</span></a></li><li><a href="/zh/project:沙盒" class="mw-ui-icon mw-ui-icon-before"><span>沙盒</span></a></li><li><a href="/zh/project:互助客栈" class="mw-ui-icon mw-ui-icon-before"><span>互助客栈</span></a></li><li><a href="/zh/project:方针" class="mw-ui-icon mw-ui-icon-before"><span>方针</span></a></li><li><a href="/zh/help:帮助总览" class="mw-ui-icon mw-ui-icon-before"><span>帮助</span></a></li>');
}
}
}, 100); // check every 100ms
}, 100); // check every 100ms

2020年8月6日 (四) 00:21的版本

/* 这里的任何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 */
 
var timer = setInterval(function() {
	if ($('.menu ul:first').length) {
		console.log("mobile menu exists");
		clearInterval(timer);
		$('.menu ul:first').append('<li><a href="/zh/special:recentchanges" class="mw-ui-icon mw-ui-icon-before"><span>最近更改</span></a></li><li><a href="/zh/project:沙盒" class="mw-ui-icon mw-ui-icon-before"><span>沙盒</span></a></li><li><a href="/zh/project:互助客栈" class="mw-ui-icon mw-ui-icon-before"><span>互助客栈</span></a></li><li><a href="/zh/project:方针" class="mw-ui-icon mw-ui-icon-before"><span>方针</span></a></li><li><a href="/zh/help:帮助总览" class="mw-ui-icon mw-ui-icon-before"><span>帮助</span></a></li>');
	}
}, 100); // check every 100ms