User:Xiplus/js/HRTProtectLink.js

维基百科,自由的百科全书

注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google ChromeFirefoxMicrosoft EdgeSafari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。

if (mw.config.get("wgNamespaceNumber") == 10 || mw.config.get("wgNamespaceNumber") == 828) {
	mw.loader.using(['mediawiki.util']).done(function(){
		mw.util.addPortletLink(
			'p-cactions',
			mw.config.get("wgServer")+mw.config.get("wgScriptPath")+'/index.php?title='+encodeURIComponent(mw.config.get('wgPageName'))+'&action=protect&mwProtect-level-edit=autoconfirmed&mwProtect-level-move=autoconfirmed&mwProtect-reason=高風險模板',
			'半保護高風險模板'
		);
		mw.util.addPortletLink(
			'p-cactions',
			mw.config.get("wgServer")+mw.config.get("wgScriptPath")+'/index.php?title='+encodeURIComponent(mw.config.get('wgPageName'))+'&action=protect&mwProtect-level-edit=sysop&mwProtect-level-move=sysop&mwProtect-reason=高風險模板',
			'全保護高風險模板'
		);
	});
}