User:小躍/GoToSubmit.js
外观
< User:小躍
注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google Chrome、Firefox、Microsoft Edge及Safari:按住⇧ 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=wgULS('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';
});