1,975
次編輯
小 (已匯入 1 筆修訂:Twinkle) |
Xiplus-bot(留言 | 貢獻) 小 (繁簡轉換) |
||
Twinkle.warn = function twinklewarn() {
if( mw.config.get( 'wgRelevantUserName' ) ) {
Twinkle.addPortletLink( Twinkle.warn.callback, "警告", "tw-warn", "警告或提醒用
}
if ( $vandalTalkLink.length ) {
$vandalTalkLink.css("font-weight", "bold");
$vandalTalkLink.wrapInner($("<span/>").attr("title", "如果合
var extraParam = "vanarticle=" + mw.util.rawurlencode(Morebits.pageNameNorm);
Twinkle.warn.callback = function twinklewarnCallback() {
if( mw.config.get( 'wgRelevantUserName' ) === mw.config.get( 'wgUserName' ) &&
!confirm( '您
return;
}
var Window = new Morebits.simpleWindow( 600, 440 );
Window.setTitle( "警告、通知用
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "
Window.addFooterLink( "Twinkle
var form = new Morebits.quickForm( Twinkle.warn.callback.evaluate );
var main_select = form.append( {
type: 'field',
label: '
tooltip: '首先
} );
var defaultGroup = parseInt(Twinkle.getPref('defaultWarningGroup'), 10);
main_group.append( { type: 'option', label: '
main_group.append( { type: 'option', label: '
main_group.append( { type: 'option', label: '
main_group.append( { type: 'option', label: '
main_group.append( { type: 'option', label: '
main_group.append( { type: 'option', label: '
main_group.append( { type: 'option', label: '
if( Twinkle.getPref( 'customWarningList' ).length ) {
main_group.append( { type: 'option', label: '自定
}
type: 'input',
name: 'article',
label: '
value:( Morebits.queryString.exists( 'vanarticle' ) ? Morebits.queryString.get( 'vanarticle' ) : '' ),
tooltip: '
} );
var more = form.append( { type: 'field', name: 'reasonGroup', label: '警告信息' } );
more.append( { type: 'textarea', label: '可
var previewlink = document.createElement( 'a' );
});
previewlink.style.cursor = "pointer";
previewlink.textContent = '
more.append( { type: 'div', id: 'warningpreview', label: [ previewlink ] } );
more.append( { type: 'div', id: 'twinklewarn-previewbox', style: 'display: none' } );
Twinkle.warn.messages = {
level1: {
"不同
"uw-vandalism1": {
label: "破
summary: "
},
"uw-test1": {
label: "
summary: "
},
"uw-delete1": {
label: "清空
summary: "
},
"uw-redirect1": {
label: "
summary: "
},
"uw-tdel1": {
label: "移除
summary: "
},
"uw-joke1": {
label: "加入不
summary: "
},
"uw-create1": {
label: "
summary: "
},
"uw-upload1": {
label: "上
summary: "
},
"uw-image1": {
label: "
summary: "
}
},
"增加商品或政治
"uw-spam1": {
label: "增加垃圾
summary: "
},
"uw-advert1": {
label: "利用
summary: "
},
"uw-npov1": {
label: "不遵守中立的
summary: "
}
},
"加插不
"uw-unsourced1": {
label: "
summary: "
},
"uw-error1": {
label: "故意加入不
summary: "
},
"uw-biog1": {
label: "加入有
summary: "
},
"uw-defamatory1": {
label: "
summary: "
}
},
"翻
"uw-roughtranslation1": {
label: "粗劣翻
summary: "
}
},
"非能接受且
"uw-notcensored1": {
label: "
summary: "
},
"uw-mos1": {
label: "格式、日期、
summary: "
},
"uw-move1": {
label: "
summary: "
},
"uw-cd1": {
label: "把
summary: "
},
"uw-chat1": {
label: "把
summary: "
},
"uw-tpv1": {
label: "改
summary: "
},
"uw-afd1": {
label: "移除{{afd}}模板",
summary: "
},
"uw-speedy1": {
label: "移除{{delete}}模板",
summary: "
}
},
"
"uw-npa1": {
label: "
summary: "
},
"uw-agf1": {
label: "
summary: "
},
"uw-own1": {
label: "
summary: "
},
"uw-tempabuse1": {
label: "不
summary: "
}
}
level2: {
"不同
"uw-vandalism2": {
label: "破
summary: "
},
"uw-test2": {
label: "
summary: "
},
"uw-delete2": {
label: "清空
summary: "
},
"uw-redirect2": {
label: "
summary: "
},
"uw-tdel2": {
label: "移除
summary: "
},
"uw-joke2": {
label: "加入不
summary: "
},
"uw-create2": {
label: "
summary: "
},
"uw-upload2": {
label: "上
summary: "
},
"uw-image2": {
label: "
summary: "
}
},
"增加商品或政治
"uw-spam2": {
label: "增加垃圾
summary: "
},
"uw-advert2": {
label: "利用
summary: "
},
"uw-npov2": {
label: "不遵守中立的
summary: "
}
},
"加插不
"uw-unsourced2": {
label: "
summary: "
},
"uw-error2": {
label: "故意加入不
summary: "
},
"uw-biog2": {
label: "加入有
summary: "
},
"uw-defamatory2": {
label: "
summary: "
}
},
"翻
"uw-roughtranslation2": {
label: "粗劣翻
summary: "
}
},
"非能接受且
"uw-notcensored2": {
label: "
summary: "
},
"uw-mos2": {
label: "格式、日期、
summary: "
},
"uw-move2": {
label: "
summary: "
},
"uw-cd2": {
label: "把
summary: "
},
"uw-chat2": {
label: "把
summary: "
},
"uw-tpv2": {
label: "改
summary: "
},
"uw-afd2": {
label: "移除{{afd}}模板",
summary: "
},
"uw-speedy2": {
label: "移除{{delete}}模板",
summary: "
}
},
"
"uw-npa2": {
label: "
summary: "
},
"uw-agf2": {
label: "
summary: "
},
"uw-own2": {
label: "
summary: "
},
"uw-tempabuse2": {
label: "不
summary: "
}
}
level3: {
"不同
"uw-vandalism3": {
label: "破
summary: "
},
"uw-test3": {
label: "
summary: "
},
"uw-delete3": {
label: "清空
summary: "
},
"uw-redirect3": {
label: "
summary: "
},
"uw-tdel3": {
label: "移除
summary: "
},
"uw-joke3": {
label: "加入不
summary: "
},
"uw-create3": {
label: "
summary: "
},
"uw-upload3": {
label: "上
summary: "
},
"uw-image3": {
label: "
summary: "
}
},
"增加商品或政治
"uw-spam3": {
label: "增加垃圾
summary: "
},
"uw-advert3": {
label: "利用
summary: "
},
"uw-npov3": {
label: "不遵守中立的
summary: "
}
},
"加插不
"uw-unsourced3": {
label: "
summary: "
},
"uw-error3": {
label: "故意加入不
summary: "
},
"uw-biog3": {
label: "加入有
summary: "
},
"uw-defamatory3": {
label: "
summary: "
}
},
"翻
"uw-roughtranslation3": {
label: "粗劣翻
summary: "
}
},
"非能接受且
"uw-notcensored3": {
label: "
summary: "
},
"uw-mos3": {
label: "格式、日期、
summary: "
},
"uw-move3": {
label: "
summary: "
},
"uw-cd3": {
label: "把
summary: "
},
"uw-chat3": {
label: "把
summary: "
},
"uw-tpv3": {
label: "改
summary: "
},
"uw-afd3": {
label: "移除{{afd}}模板",
summary: "
},
"uw-speedy3": {
label: "移除{{delete}}模板",
summary: "
}
},
"
"uw-npa3": {
label: "
summary: "
},
"uw-agf3": {
label: "
summary: "
},
"uw-own3": {
label: "
summary: "
},
"uw-tempabuse3": {
label: "不
summary: "
}
}
level4: {
"不同
"uw-vandalism4": {
label: "破
summary: "
},
"uw-test4": {
label: "
summary: "
},
"uw-delete4": {
label: "清空
summary: "
},
"uw-redirect4": {
label: "
summary: "
},
"uw-tdel4": {
label: "移除
summary: "
},
"uw-joke4": {
label: "加入不
summary: "
},
"uw-create4": {
label: "
summary: "
},
"uw-upload4": {
label: "上
summary: "
},
"uw-image4": {
label: "
summary: "
}
},
"增加商品或政治
"uw-spam4": {
label: "增加垃圾
summary: "
},
"uw-advert4": {
label: "利用
summary: "
},
"uw-npov4": {
label: "不遵守中立的
summary: "
}
},
"加插不
"uw-biog4": {
label: "加入有
summary: "
},
"uw-defamatory4": {
label: "
summary: "
}
},
"非能接受且
"uw-mos4": {
label: "格式、日期、
summary: "
},
"uw-move4": {
label: "
summary: "
},
"uw-chat4": {
label: "把
summary: "
},
"uw-afd4": {
label: "移除{{afd}}模板",
summary: "
},
"uw-speedy4": {
label: "移除{{delete}}模板",
summary: "
}
},
"
"uw-npa4": {
label: "
summary: "
},
"uw-tempabuse4": {
label: "不
summary: "
}
}
level4im: {
"不同
"uw-vandalism4im": {
label: "破
summary: "
},
"uw-delete4im": {
label: "清空
summary: "
},
"uw-redirect4im": {
label: "
summary: "
},
"uw-joke4im": {
label: "加入不
summary: "
},
"uw-create4im": {
label: "
summary: "
},
"uw-upload4im": {
label: "上
summary: "
},
"uw-image4im": {
label: "
summary: "
}
},
"增加商品或政治
"uw-spam4im": {
label: "增加垃圾
summary: "
}
},
"加插不
"uw-biog4im": {
label: "加入有
summary: "
},
"uw-defamatory4im": {
label: "
summary: "
}
},
"非能接受且
"uw-move4im": {
label: "
summary: "
}
},
"
"uw-npa4im": {
label: "
summary: "
},
"uw-tempabuse4im": {
label: "不
summary: "
}
}
singlenotice: {
"uw-2redirect": {
label: "透
summary: "
},
"uw-aiv": {
label: "不恰
summary: "
},
"uw-articlesig": {
label: "在
summary: "
},
"uw-autobiography": {
label: "建立自
summary: "
},
"uw-badcat": {
label: "加入
summary: "
},
"uw-bite": {
label: "
summary: "
},
"uw-booktitle": {
label: "
summary: "
},
"uw-c&pmove": {
label: "剪
summary: "
},
"uw-chinese": {
label: "不是以中文
summary: "
},
"uw-coi": {
label: "利益
summary: "
},
"uw-copyright-friendly": {
label: "初次加入侵犯版
summary: "
},
"uw-copyviorewrite": {
label: "在侵
summary: "
},
"uw-crystal": {
label: "加入臆
summary: "
},
"uw-csd": {
label: "快速
summary: "
},
"uw-dab": {
label: "消歧
summary: "
},
"uw-date": {
label: "不必要地更
summary: "
},
"uw-editsummary": {
label: "
summary: "
},
"uw-hangon": {
label: "
summary: "
},
"uw-lang": {
label: "不必要地
summary: "
},
"uw-langmove": {
label: "不必要地
summary: "
},
"uw-linking": {
label: "
summary: "
},
"uw-minor": {
label: "不
summary: "
},
"uw-notaiv": {
label: "不要向
summary: "
},
"uw-notvote": {
label: "我
summary: "
},
"uw-preview": {
label: "使用
summary: "
},
"uw-sandbox": {
label: "移除沙盒的置
summary: "
},
"uw-selfrevert": {
label: "回退
summary: "
},
"uw-subst": {
label: "
summary: "
},
"uw-talkinarticle": {
label: "在
summary: "
},
"uw-tilde": {
label: "
summary: "
},
"uw-translated": {
label: "翻
summary: "
},
"uw-uaa": {
label: "向更改用
summary: "
},
"uw-warn": {
label: "警告破
summary: "
}
},
singlewarn: {
"uw-3rr": {
label: "用
summary: "
},
"uw-attack": {
label: "建立人身攻
summary: "
suppressArticleInSummary: true
},
"uw-bv": {
label: "公然的破
summary: "
},
"uw-canvass": {
label: "不恰
summary: "
},
"uw-copyright": {
label: "侵犯版
summary: "
},
"uw-copyright-link": {
label: "
summary: "
},
"uw-fakesource": {
label: "
summary: "
},
"uw-hoax": {
label: "建立
summary: "
},
"uw-incompletecite": {
label: "列出的
summary: "
},
"uw-legal": {
label: "
summary: "
},
"uw-longterm": {
label: "
summary: "
},
"uw-multipleIPs": {
label: "使用多
summary: "
},
"uw-npov-tvd": {
label: "在
summary: "
},
"uw-pinfo": {
label: "
summary: "
},
"uw-upv": {
label: "用
summary: "
},
"uw-selfinventedname": {
label: "不
summary: "
},
"uw-substub": {
label: "
summary: "
},
"uw-username": {
label: "不恰
summary: "
},
"uw-wrongsummary": {
label: "在
summary: "
}
}
if (value === "uw-socksuspect") {
Morebits.quickForm.setElementTooltipVisibility(e.target.form.article, false);
Morebits.quickForm.overrideElementLabel(e.target.form.article, "傀儡操
} else if (value === "uw-username") {
Morebits.quickForm.setElementTooltipVisibility(e.target.form.article, false);
Morebits.quickForm.overrideElementLabel(e.target.form.article, "用
} else if (value === "uw-bite") {
Morebits.quickForm.setElementTooltipVisibility(e.target.form.article, false);
Morebits.quickForm.overrideElementLabel(e.target.form.article, "被
} else {
Morebits.quickForm.setElementTooltipVisibility(e.target.form.article, true);
var $redWarning;
if (value === "uw-username") {
$redWarning = $("<div style='color: red;' id='tw-warn-red-notice'>{{uw-username}}<b>不
"明
"{{uw-username}}
$redWarning.insertAfter(Morebits.quickForm.getElementLabelObject(e.target.form.reasonGroup));
};
if( temp_time > date ) {
if( !confirm( "近24小
pageobj.statelem.info( '用
return;
}
if( latest.date > date ) {
if( !confirm( "近1分
pageobj.statelem.info( '用
return;
}
text += "== " + messageData.heading + " ==\n";
} else if( !dateHeaderRegexResult || dateHeaderRegexResult.index !== lastHeaderIndex ) {
Morebits.status.info( '信息', '未找到
text += "== " + date.getUTCFullYear() + "年" + (date.getUTCMonth() + 1) + "月 " + " ==\n";
}
if ( Twinkle.getPref('showSharedIPNotice') && Morebits.isIPAddress( mw.config.get('wgTitle') ) ) {
Morebits.status.info( '信息', '添加共享IP
text += "\n{{subst:SharedIPAdvice}}";
}
break;
case "4":
summary = "最
break;
case "m":
summary += ",[[User:" + params.article + "]]的";
} else {
summary += ",
}
}
if(e.target.sub_group.value === 'uw-username' && e.target.article.value.trim() === '') {
alert("必
return;
}
Morebits.wiki.actionCompleted.redirect = userTalkPage;
Morebits.wiki.actionCompleted.notice = "警告完成,
var wikipedia_page = new Morebits.wiki.page( userTalkPage, '用
wikipedia_page.setCallbackParameters( params );
wikipedia_page.setFollowRedirect( true );
|