跳转到内容

User:小躍/GoToSubmit.js

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

这是本页的一个历史版本,由小躍留言 | 贡献2018年8月19日 (日) 07:10 (修改js程式碼設置,由小躍的templatescript所驅動生成的自動摘要)编辑。这可能和当前版本存在着巨大的差异。

注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google ChromeFirefoxMicrosoft EdgeSafari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。
var GoToSubmit='';
var LG=mw.config.get('wgUserLanguage');
switch(LG){
	case 'de':GoToSubmit='Gehe zu Senden';break;
	case 'es':GoToSubmit='Ir a Enviar';break;
	case 'fr':GoToSubmit='Aller à soumettre';break;
	case 'ja':GoToSubmit='送信する';break;
	default:GoToSubmit='Go to Submit (去提交) ';
}

if( $.inArray(mw.config.get('wgAction'), ['edit', 'submit']) !== -1) {
	var GoToSubmitBtn='<button id="wpGoToSubmit">' + GoToSubmit +'</button>';
	$('#mw-content-text').before(GoToSubmitBtn);
	$('#wpGoToSubmit').addClass('mw-ui-button mw-ui-progressive');
	$('#wpGoToSubmit').css('position','fixed').css('top','150px').css('right','25px');
}
$('#wpGoToSubmit').click(function(){
	 var ol=window.location.href;
	 location.href=window.location.href+'#wpSummaryLabel'; 
});