「MediaWiki:Gadget-Twinkle.js」:修訂間差異

文字取代 - "WP:" 取代為 "MP:"
(建立內容為「/** * +-------------------------------------------------------------------------+ * | === WARNING: GLOBAL GADGET FILE === | * | Changes to this page affect many users. | * | Please discuss changes at WT:TW before editing. | * +-------------------------------------------------------------------------+ * * Imported from github [https://github.com/azatoth/twinkle]…」的新頁面)
 
(文字取代 - "WP:" 取代為 "MP:")
 
第12行: 第12行:
  * ----------
  * ----------
  *
  *
  * This is AzaToth's Twinkle. See [[WP:TW]].
  * This is AzaToth's Twinkle. See [[MP:TW]].
  * It needs a better header comment than this one.
  * It needs a better header comment than this one.
  */
  */
第38行: 第38行:
Twinkle.defaultConfig.twinkle = {
Twinkle.defaultConfig.twinkle = {
// General
// General
summaryAd: " ([[WP:TW|TW]])",
summaryAd: " ([[MP:TW|TW]])",
deletionSummaryAd: " ([[WP:TW|TW]])",
deletionSummaryAd: " ([[MP:TW|TW]])",
protectionSummaryAd: " ([[WP:TW|TW]])",
protectionSummaryAd: " ([[MP:TW|TW]])",
userTalkPageMode: "window",
userTalkPageMode: "window",
dialogLargeFont: false,
dialogLargeFont: false,
第330行: 第330行:
Window.setTitle( "Shared IP address tagging" );
Window.setTitle( "Shared IP address tagging" );
Window.setScriptName( "Twinkle" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#shared" );
Window.addFooterLink( "Twinkle help", "MP:TW/DOC#shared" );


var form = new QuickForm( Twinkle.shared.callback.evaluate );
var form = new QuickForm( Twinkle.shared.callback.evaluate );
第515行: 第515行:
Window.setScriptName( "Twinkle" );
Window.setScriptName( "Twinkle" );
// anyone got a good policy/guideline/info page/instructional page link??
// anyone got a good policy/guideline/info page/instructional page link??
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#tag" );
Window.addFooterLink( "Twinkle help", "MP:TW/DOC#tag" );


var form = new QuickForm( Twinkle.tag.callback.evaluate );
var form = new QuickForm( Twinkle.tag.callback.evaluate );
第1,463行: 第1,463行:
Window.setScriptName( "Twinkle" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "About {{talkback}}", "Template:Talkback" );
Window.addFooterLink( "About {{talkback}}", "Template:Talkback" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#talkback" );
Window.addFooterLink( "Twinkle help", "MP:TW/DOC#talkback" );


var form = new QuickForm( Twinkle.talkback.callback.evaluate );
var form = new QuickForm( Twinkle.talkback.callback.evaluate );
第1,571行: 第1,571行:
noticeboard.append( {
noticeboard.append( {
type: 'option',
type: 'option',
label: "WP:AN (Administrators' noticeboard)",
label: "MP:AN (Administrators' noticeboard)",
value: "Wikipedia:Administrators' noticeboard"
value: "Wikipedia:Administrators' noticeboard"
} );
} );
noticeboard.append( {
noticeboard.append( {
type: 'option',
type: 'option',
label: 'WP:ANI (Administrators\' noticeboard/Incidents)',
label: 'MP:ANI (Administrators\' noticeboard/Incidents)',
selected: true,
selected: true,
value: "Wikipedia:Administrators' noticeboard/Incidents"
value: "Wikipedia:Administrators' noticeboard/Incidents"
第1,785行: 第1,785行:
Window.setTitle( "Welcome user" );
Window.setTitle( "Welcome user" );
Window.setScriptName( "Twinkle" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Welcoming Committee", "WP:WC" );
Window.addFooterLink( "Welcoming Committee", "MP:WC" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#welcome" );
Window.addFooterLink( "Twinkle help", "MP:TW/DOC#welcome" );


var form = new QuickForm( Twinkle.welcome.callback.evaluate, 'change' );
var form = new QuickForm( Twinkle.welcome.callback.evaluate, 'change' );
第2,244行: 第2,244行:
Window.setTitle( "Advance Reporting and Vetting" ); //Backronym
Window.setTitle( "Advance Reporting and Vetting" ); //Backronym
Window.setScriptName( "Twinkle" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Guide to AIV", "WP:GAIV" );
Window.addFooterLink( "Guide to AIV", "MP:GAIV" );
Window.addFooterLink( "UAA instructions", "WP:UAAI" );
Window.addFooterLink( "UAA instructions", "MP:UAAI" );
Window.addFooterLink( "About SPI", "WP:SPI" );
Window.addFooterLink( "About SPI", "MP:SPI" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#arv" );
Window.addFooterLink( "Twinkle help", "MP:TW/DOC#arv" );


var form = new QuickForm( Twinkle.arv.callback.evaluate );
var form = new QuickForm( Twinkle.arv.callback.evaluate );
第2,258行: 第2,258行:
categories.append( {
categories.append( {
type: 'option',
type: 'option',
label: 'Vandalism (WP:AIV)',
label: 'Vandalism (MP:AIV)',
value: 'aiv'
value: 'aiv'
} );
} );
categories.append( {
categories.append( {
type: 'option',
type: 'option',
label: 'Username (WP:UAA)',
label: 'Username (MP:UAA)',
value: 'username'
value: 'username'
} );
} );
categories.append( {
categories.append( {
type: 'option',
type: 'option',
label: 'Sockpuppeteer (WP:SPI)',
label: 'Sockpuppeteer (MP:SPI)',
value: 'sock'
value: 'sock'
} );
} );
categories.append( {
categories.append( {
type: 'option',
type: 'option',
label: 'Sockpuppet (WP:SPI)',
label: 'Sockpuppet (MP:SPI)',
value: 'puppet'
value: 'puppet'
} );
} );
第2,657行: 第2,657行:
break;
break;
// WP:SPI
// MP:SPI
case "sock":
case "sock":
/* falls through */
/* falls through */
第2,774行: 第2,774行:
Window.setTitle( "Batch deletion" );
Window.setTitle( "Batch deletion" );
Window.setScriptName( "Twinkle" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#batchdelete" );
Window.addFooterLink( "Twinkle help", "MP:TW/DOC#batchdelete" );


var form = new QuickForm( Twinkle.batchdelete.callback.evaluate );
var form = new QuickForm( Twinkle.batchdelete.callback.evaluate );
第3,046行: 第3,046行:
var title = snapshot.snapshotItem(i).value;
var title = snapshot.snapshotItem(i).value;
var wikipedia_page = new Wikipedia.page( title, "Deleting " + title );
var wikipedia_page = new Wikipedia.page( title, "Deleting " + title );
wikipedia_page.setEditSummary('[[WP:CSD#G8|G8]]: Redirect to deleted page "' + self.params.page + '"' + Twinkle.getPref('deletionSummaryAd'));
wikipedia_page.setEditSummary('[[MP:CSD#G8|G8]]: Redirect to deleted page "' + self.params.page + '"' + Twinkle.getPref('deletionSummaryAd'));
wikipedia_page.setCallbackParameters(params);
wikipedia_page.setCallbackParameters(params);
wikipedia_page.deletePage(onsuccess);
wikipedia_page.deletePage(onsuccess);
第3,617行: 第3,617行:
Window.setTitle( "Close AFC" );
Window.setTitle( "Close AFC" );
Window.setScriptName( "Twinkle" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "AFC reviewing instructions", "WP:AFCR" );
Window.addFooterLink( "AFC reviewing instructions", "MP:AFCR" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#closer-afc" );
Window.addFooterLink( "Twinkle help", "MP:TW/DOC#closer-afc" );


var form = new QuickForm( Twinkle.closer.callbacks.afc.evaluate );
var form = new QuickForm( Twinkle.closer.callbacks.afc.evaluate );
第3,671行: 第3,671行:
Window.setScriptName( "Twinkle" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "AFD closing instructions", "Wikipedia:Articles for deletion/Administrator instructions" );
Window.addFooterLink( "AFD closing instructions", "Wikipedia:Articles for deletion/Administrator instructions" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#closer-afd" );
Window.addFooterLink( "Twinkle help", "MP:TW/DOC#closer-afd" );


var form = new QuickForm( Twinkle.closer.callbacks.afd.evaluate );
var form = new QuickForm( Twinkle.closer.callbacks.afd.evaluate );
第4,041行: 第4,041行:


wp_page = Wikipedia.page(affected_page, 'Deleting page');
wp_page = Wikipedia.page(affected_page, 'Deleting page');
wp_page.setEditSummary("Deleted per outcome of [[WP:AFD]] discussion (see [[" + params.page + "]])." + Twinkle.getPref('deletionSummaryAd'));
wp_page.setEditSummary("Deleted per outcome of [[MP:AFD]] discussion (see [[" + params.page + "]])." + Twinkle.getPref('deletionSummaryAd'));
wp_page.deletePage();
wp_page.deletePage();
}
}
第4,057行: 第4,057行:
var title = $(this).attr('title');
var title = $(this).attr('title');
var page = new Wikipedia.page(title, "Deleting redirecting page " + title);
var page = new Wikipedia.page(title, "Deleting redirecting page " + title);
page.setEditSummary("Speedy deleted per ([[WP:CSD#R1|CSD R1]]), Redirect to deleted page \"" + self.params.affected_page + "\"." + Twinkle.getPref('deletionSummaryAd'));
page.setEditSummary("Speedy deleted per ([[MP:CSD#R1|CSD R1]]), Redirect to deleted page \"" + self.params.affected_page + "\"." + Twinkle.getPref('deletionSummaryAd'));
page.deletePage();
page.deletePage();
});
});
第4,082行: 第4,082行:


  I, [[User:This, that and the other]], originally wrote this.  If the code is misbehaving, or you have any
  I, [[User:This, that and the other]], originally wrote this.  If the code is misbehaving, or you have any
  questions, don't hesitate to ask me.  (This doesn't at all imply [[WP:OWN]]ership - it's just meant to
  questions, don't hesitate to ask me.  (This doesn't at all imply [[MP:OWN]]ership - it's just meant to
  point you in the right direction.)  -- TTO
  point you in the right direction.)  -- TTO
  */
  */
第4,627行: 第4,627行:


// TwinkleConfig.blankTalkpageOnIndefBlock (boolean)
// TwinkleConfig.blankTalkpageOnIndefBlock (boolean)
// if true, blank the talk page when issuing an indef block notice (per [[WP:UW#Indefinitely blocked users]])
// if true, blank the talk page when issuing an indef block notice (per [[MP:UW#Indefinitely blocked users]])
{
{
name: "blankTalkpageOnIndefBlock",
name: "blankTalkpageOnIndefBlock",
label: "Blank the talk page when indefinitely blocking users",
label: "Blank the talk page when indefinitely blocking users",
helptip: "See <a href=\"" + mw.util.getUrl("WP:UW#Indefinitely blocked users") + "\">WP:UW</a> for more information.",
helptip: "See <a href=\"" + mw.util.getUrl("MP:UW#Indefinitely blocked users") + "\">MP:UW</a> for more information.",
adminOnly: true,
adminOnly: true,
type: "boolean"
type: "boolean"
第5,752行: 第5,752行:


pageobj.setPageText(text);
pageobj.setPageText(text);
pageobj.setEditSummary("Saving Twinkle preferences: automatic edit from [[" + mw.config.get("wgPageName") + "]] ([[WP:TW|TW]])");
pageobj.setEditSummary("Saving Twinkle preferences: automatic edit from [[" + mw.config.get("wgPageName") + "]] ([[MP:TW|TW]])");
pageobj.setCreateOption("recreate");
pageobj.setCreateOption("recreate");
pageobj.save(Twinkle.config.saveSuccess);
pageobj.save(Twinkle.config.saveSuccess);
第5,764行: 第5,764行:
noticebox.style.fontSize = "100%";
noticebox.style.fontSize = "100%";
noticebox.style.marginTop = "2em";
noticebox.style.marginTop = "2em";
noticebox.innerHTML = "<p><b>Your Twinkle preferences have been saved.</b></p><p>To see the changes, you will need to <a href=\"" + mw.util.getUrl("WP:BYPASS") + "\" title=\"WP:BYPASS\"><b>bypass your browser cache</b></a>.</p>";
noticebox.innerHTML = "<p><b>Your Twinkle preferences have been saved.</b></p><p>To see the changes, you will need to <a href=\"" + mw.util.getUrl("MP:BYPASS") + "\" title=\"MP:BYPASS\"><b>bypass your browser cache</b></a>.</p>";
Status.root.appendChild(noticebox);
Status.root.appendChild(noticebox);
var noticeclear = document.createElement("br");
var noticeclear = document.createElement("br");
第5,794行: 第5,794行:
Window.setTitle( "Batch file deletion" );
Window.setTitle( "Batch file deletion" );
Window.setScriptName( "Twinkle" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#delimages" );
Window.addFooterLink( "Twinkle help", "MP:TW/DOC#delimages" );


var form = new QuickForm( Twinkle.delimages.callback.evaluate );
var form = new QuickForm( Twinkle.delimages.callback.evaluate );
第6,025行: 第6,025行:
Window.setTitle( "PROD cleaning" );
Window.setTitle( "PROD cleaning" );
Window.setScriptName( "Twinkle" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Proposed deletion", "WP:PROD" );
Window.addFooterLink( "Proposed deletion", "MP:PROD" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#deprod" );
Window.addFooterLink( "Twinkle help", "MP:TW/DOC#deprod" );


var form = new QuickForm( callback_commit );
var form = new QuickForm( callback_commit );
第6,135行: 第6,135行:


var page = new Wikipedia.page('Talk:' + self.params.page, "Deleting talk page");
var page = new Wikipedia.page('Talk:' + self.params.page, "Deleting talk page");
page.setEditSummary("Deleted talk page of a page because expired [[WP:PROD]]." + Twinkle.getPref('deletionSummaryAd'));
page.setEditSummary("Deleted talk page of a page because expired [[MP:PROD]]." + Twinkle.getPref('deletionSummaryAd'));
page.deletePage();
page.deletePage();


page = new Wikipedia.page(self.params.page, "Deleting article");
page = new Wikipedia.page(self.params.page, "Deleting article");
page.setEditSummary("DDeleted because expired [[WP:PROD]]; Reason given: " + self.params.reason + "." + Twinkle.getPref('deletionSummaryAd'));
page.setEditSummary("DDeleted because expired [[MP:PROD]]; Reason given: " + self.params.reason + "." + Twinkle.getPref('deletionSummaryAd'));
page.deletePage();
page.deletePage();


第6,149行: 第6,149行:
var title = $(this).attr('title');
var title = $(this).attr('title');
var page = new Wikipedia.page(title, "Deleting redirecting page " + title);
var page = new Wikipedia.page(title, "Deleting redirecting page " + title);
page.setEditSummary("Speedy deleted per ([[WP:CSD#R1|CSD R1]]), Redirect to deleted page \"" + self.params.page + "\"." + Twinkle.getPref('deletionSummaryAd'));
page.setEditSummary("Speedy deleted per ([[MP:CSD#R1|CSD R1]]), Redirect to deleted page \"" + self.params.page + "\"." + Twinkle.getPref('deletionSummaryAd'));
page.deletePage();
page.deletePage();
});
});
第6,658行: 第6,658行:


userstr = self.params.user.replace("\\'", "'");
userstr = self.params.user.replace("\\'", "'");
summary = "Reverted [[WP:AGF|good faith]] edits by [[Special:Contributions/" + userstr + "|" + userstr + "]] ([[User talk:" +  
summary = "Reverted [[MP:AGF|good faith]] edits by [[Special:Contributions/" + userstr + "|" + userstr + "]] ([[User talk:" +  
userstr + "|talk]])" + Twinkle.fluff.formatSummaryPostfix(extra_summary) + Twinkle.getPref('summaryAd');
userstr + "|talk]])" + Twinkle.fluff.formatSummaryPostfix(extra_summary) + Twinkle.getPref('summaryAd');
break;
break;
第6,667行: 第6,667行:
gooduserstr = self.params.gooduser.replace("\\'", "'")
gooduserstr = self.params.gooduser.replace("\\'", "'")
summary = "Reverted " + self.params.count + (self.params.count > 1 ? ' edits' : ' edit') + " by [[Special:Contributions/" +
summary = "Reverted " + self.params.count + (self.params.count > 1 ? ' edits' : ' edit') + " by [[Special:Contributions/" +
userstr + "|" + userstr + "]] ([[User talk:" + userstr + "|talk]]) identified as [[WP:VAND|vandalism]] to last revision by " +
userstr + "|" + userstr + "]] ([[User talk:" + userstr + "|talk]]) identified as [[MP:VAND|vandalism]] to last revision by " +
gooduserstr + "." + Twinkle.getPref('summaryAd');
gooduserstr + "." + Twinkle.getPref('summaryAd');
break;
break;
第6,817行: 第6,817行:
Window.setTitle( "File for dated speedy deletion" );
Window.setTitle( "File for dated speedy deletion" );
Window.setScriptName( "Twinkle" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Speedy deletion policy", "WP:CSD" );
Window.addFooterLink( "Speedy deletion policy", "MP:CSD" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#image" );
Window.addFooterLink( "Twinkle help", "MP:TW/DOC#image" );


var form = new QuickForm( Twinkle.image.callback.evaluate );
var form = new QuickForm( Twinkle.image.callback.evaluate );
第6,877行: 第6,877行:
label: 'Replaceable fair use (CSD F7)',
label: 'Replaceable fair use (CSD F7)',
value: 'replaceable fair use',
value: 'replaceable fair use',
tooltip: 'Image or media may fail Wikipedia\'s first non-free content criterion ([[WP:NFCC#1]]) in that it illustrates a subject for which a free image might reasonably be found or created that adequately provides the same information'
tooltip: 'Image or media may fail Wikipedia\'s first non-free content criterion ([[MP:NFCC#1]]) in that it illustrates a subject for which a free image might reasonably be found or created that adequately provides the same information'
},
},
{
{
第7,085行: 第7,085行:


pageobj.setPageText(tag + text);
pageobj.setPageText(tag + text);
pageobj.setEditSummary("This file is up for deletion, per [[WP:CSD#" + params.normalized + "|CSD " + params.normalized + "]] (" + params.type + ")." + Twinkle.getPref('summaryAd'));
pageobj.setEditSummary("This file is up for deletion, per [[MP:CSD#" + params.normalized + "|CSD " + params.normalized + "]] (" + params.type + ")." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('deliWatchPage')) {
switch (Twinkle.getPref('deliWatchPage')) {
case 'yes':
case 'yes':
第7,165行: 第7,165行:
Window.setTitle( "Image traverse" );
Window.setTitle( "Image traverse" );
Window.setScriptName( "Twinkle" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#imagetraverse" );
Window.addFooterLink( "Twinkle help", "MP:TW/DOC#imagetraverse" );


var form = new QuickForm( Twinkle.imagetraverse.callback.evaluate );
var form = new QuickForm( Twinkle.imagetraverse.callback.evaluate );
第7,465行: 第7,465行:
}
}
if (twinkleUserAuthorized) {
if (twinkleUserAuthorized) {
$(twAddPortletLink("#", "PROD", "tw-prod", "Propose deletion via WP:PROD", "")).click(Twinkle.prod.callback);
$(twAddPortletLink("#", "PROD", "tw-prod", "Propose deletion via MP:PROD", "")).click(Twinkle.prod.callback);
} else {
} else {
$(twAddPortletLink("#", 'PROD', 'tw-prod', 'Propose deletion via WP:PROD', '')).click(function() {
$(twAddPortletLink("#", 'PROD', 'tw-prod', 'Propose deletion via MP:PROD', '')).click(function() {
alert("Your account is too new to use Twinkle.");
alert("Your account is too new to use Twinkle.");
});
});
第7,479行: 第7,479行:
Window.setTitle( "Proposed deletion (PROD)" );
Window.setTitle( "Proposed deletion (PROD)" );
Window.setScriptName( "Twinkle" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Proposed deletion policy", "WP:PROD" );
Window.addFooterLink( "Proposed deletion policy", "MP:PROD" );
Window.addFooterLink( "BLP PROD policy", "WP:BLPPROD" );
Window.addFooterLink( "BLP PROD policy", "MP:BLPPROD" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#prod" );
Window.addFooterLink( "Twinkle help", "MP:TW/DOC#prod" );


var form = new QuickForm( Twinkle.prod.callback.evaluate );
var form = new QuickForm( Twinkle.prod.callback.evaluate );
第7,498行: 第7,498行:
value: 'prod',
value: 'prod',
checked: true,
checked: true,
tooltip: 'Normal proposed deletion, per [[WP:PROD]]'
tooltip: 'Normal proposed deletion, per [[MP:PROD]]'
},
},
{
{
label: 'BLP PROD (proposed deletion of unsourced BLPs)',
label: 'BLP PROD (proposed deletion of unsourced BLPs)',
value: 'prodblp',
value: 'prodblp',
tooltip: 'Proposed deletion of new, completely unsourced biographies of living persons, per [[WP:BLPPROD]]'
tooltip: 'Proposed deletion of new, completely unsourced biographies of living persons, per [[MP:BLPPROD]]'
}
}
]
]
第7,636行: 第7,636行:
}
}


summaryText = "Proposing article for deletion per [[WP:" + (params.blp ? "BLP" : "") + "PROD]].";
summaryText = "Proposing article for deletion per [[MP:" + (params.blp ? "BLP" : "") + "PROD]].";
text = "{{subst:prod" + (params.blp ? " blp" : ("|1=" + params.reason)) + "}}\n" + text;
text = "{{subst:prod" + (params.blp ? " blp" : ("|1=" + params.reason)) + "}}\n" + text;
}
}
第7,654行: 第7,654行:
}
}


summaryText = "Endorsing proposed deletion per [[WP:" + (params.blp ? "BLP" : "") + "PROD]].";
summaryText = "Endorsing proposed deletion per [[MP:" + (params.blp ? "BLP" : "") + "PROD]].";
text = text.replace( prod_re, text.match( prod_re ) + "\n{{prod-2|1=" + (params.blp ? "article is a [[WP:BLPPROD|biography of a living person with no sources]]" : params.reason) + "}}\n" );
text = text.replace( prod_re, text.match( prod_re ) + "\n{{prod-2|1=" + (params.blp ? "article is a [[MP:BLPPROD|biography of a living person with no sources]]" : params.reason) + "}}\n" );


if( Twinkle.getPref('logProdPages') ) {
if( Twinkle.getPref('logProdPages') ) {
第7,699行: 第7,699行:
if (!pageobj.exists()) {
if (!pageobj.exists()) {
text =
text =
"This is a log of all [[WP:PROD|proposed deletion]] tags applied or endorsed by this user using [[WP:TW|Twinkle]]'s PROD module.\n\n" +
"This is a log of all [[MP:PROD|proposed deletion]] tags applied or endorsed by this user using [[MP:TW|Twinkle]]'s PROD module.\n\n" +
"If you no longer wish to keep this log, you can turn it off using the [[Wikipedia:Twinkle/Preferences|preferences panel]], and " +
"If you no longer wish to keep this log, you can turn it off using the [[Wikipedia:Twinkle/Preferences|preferences panel]], and " +
"nominate this page for speedy deletion under [[WP:CSD#U1|CSD U1]].\n";
"nominate this page for speedy deletion under [[MP:CSD#U1|CSD U1]].\n";
}
}


第7,809行: 第7,809行:
Window.setScriptName( "Twinkle" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Protection templates", "Template:Protection templates" );
Window.addFooterLink( "Protection templates", "Template:Protection templates" );
Window.addFooterLink( "Protection policy", "WP:PROT" );
Window.addFooterLink( "Protection policy", "MP:PROT" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#protect" );
Window.addFooterLink( "Twinkle help", "MP:TW/DOC#protect" );


var form = new QuickForm( Twinkle.protect.callback.evaluate );
var form = new QuickForm( Twinkle.protect.callback.evaluate );
第7,840行: 第7,840行:
label: 'Request page protection',
label: 'Request page protection',
value: 'request',
value: 'request',
tooltip: 'If you want to request protection via WP:RPP' + (userIsInGroup('sysop') ? ' instead of doing the protection by yourself.' : '.'),
tooltip: 'If you want to request protection via MP:RPP' + (userIsInGroup('sysop') ? ' instead of doing the protection by yourself.' : '.'),
checked: !userIsInGroup('sysop')
checked: !userIsInGroup('sysop')
},
},
第8,305行: 第8,305行:
edit: 'sysop',
edit: 'sysop',
move: 'sysop',
move: 'sysop',
reason: '[[WP:PP#Content disputes|Edit warring / Content dispute]]'
reason: '[[MP:PP#Content disputes|Edit warring / Content dispute]]'
},
},
'pp-vandalism': {
'pp-vandalism': {
edit: 'sysop',
edit: 'sysop',
move: 'sysop',
move: 'sysop',
reason: 'Persistent [[WP:Vandalism|vandalism]]'
reason: 'Persistent [[MP:Vandalism|vandalism]]'
},
},
'pp-template': {
'pp-template': {
edit: 'sysop',
edit: 'sysop',
move: 'sysop',
move: 'sysop',
reason: '[[WP:High-risk templates|Highly visible template]]'
reason: '[[MP:High-risk templates|Highly visible template]]'
},
},
'pp-usertalk': {
'pp-usertalk': {
edit: 'sysop',
edit: 'sysop',
move: 'sysop',
move: 'sysop',
reason: '[[WP:PP#Talk-page protection|Inappropriate use of user talk page while blocked]]'
reason: '[[MP:PP#Talk-page protection|Inappropriate use of user talk page while blocked]]'
},
},
'pp-semi-vandalism': {
'pp-semi-vandalism': {
edit: 'autoconfirmed',
edit: 'autoconfirmed',
reason: 'Persistent [[WP:Vandalism|vandalism]]',
reason: 'Persistent [[MP:Vandalism|vandalism]]',
template: 'pp-vandalism'
template: 'pp-vandalism'
},
},
'pp-semi-blp': {
'pp-semi-blp': {
edit: 'autoconfirmed',
edit: 'autoconfirmed',
reason: 'Violations of the [[WP:Biographies of living persons|biographies of living persons policy]]'
reason: 'Violations of the [[MP:Biographies of living persons|biographies of living persons policy]]'
},
},
'pp-semi-usertalk': {
'pp-semi-usertalk': {
edit: 'autoconfirmed',
edit: 'autoconfirmed',
move: 'sysop',
move: 'sysop',
reason: '[[WP:PP#Talk-page protection|Inappropriate use of user talk page while blocked]]'
reason: '[[MP:PP#Talk-page protection|Inappropriate use of user talk page while blocked]]'
},
},
'pp-semi-template': {
'pp-semi-template': {
edit: 'autoconfirmed',
edit: 'autoconfirmed',
move: 'sysop',
move: 'sysop',
reason: '[[WP:High-risk templates|Highly visible template]]',
reason: '[[MP:High-risk templates|Highly visible template]]',
template: 'pp-template'
template: 'pp-template'
},
},
'pp-semi-sock': {
'pp-semi-sock': {
edit: 'autoconfirmed',
edit: 'autoconfirmed',
reason: 'Persistent [[WP:Sock puppetry|sock puppetry]]'
reason: 'Persistent [[MP:Sock puppetry|sock puppetry]]'
},
},
'pp-semi-protected': {
'pp-semi-protected': {
第8,357行: 第8,357行:
'pp-move-dispute': {
'pp-move-dispute': {
move: 'sysop',
move: 'sysop',
reason: '[[WP:MOVP|Move warring]]'
reason: '[[MP:MOVP|Move warring]]'
},
},
'pp-move-vandalism': {
'pp-move-vandalism': {
move: 'sysop',
move: 'sysop',
reason: '[[WP:MOVP|Page-move vandalism]]'
reason: '[[MP:MOVP|Page-move vandalism]]'
},
},
'pp-move-indef': {
'pp-move-indef': {
move: 'sysop',
move: 'sysop',
reason: '[[WP:MOVP|Highly visible page]]'
reason: '[[MP:MOVP|Highly visible page]]'
},
},
'unprotect': {
'unprotect': {
第8,376行: 第8,376行:
'pp-create-offensive': {
'pp-create-offensive': {
create: 'sysop',
create: 'sysop',
reason: '[[WP:SALT|Offensive name]]'
reason: '[[MP:SALT|Offensive name]]'
},
},
'pp-create-salt': {
'pp-create-salt': {
create: 'sysop',
create: 'sysop',
reason: '[[WP:SALT|Repeatedly recreated]]'
reason: '[[MP:SALT|Repeatedly recreated]]'
},
},
'pp-create-blp': {
'pp-create-blp': {
create: 'sysop',
create: 'sysop',
reason: '[[WP:BLPDEL|Recently deleted BLP]]'
reason: '[[MP:BLPDEL|Recently deleted BLP]]'
},
},
'pp-create': {
'pp-create': {
第8,643行: 第8,643行:
break;
break;
case 'pp-semi-blp':
case 'pp-semi-blp':
typereason = '[[WP:BLP|BLP]] policy violations';
typereason = '[[MP:BLP|BLP]] policy violations';
break;
break;
case 'pp-move-dispute':
case 'pp-move-dispute':
第8,658行: 第8,658行:
break;
break;
case 'pp-create-blp':
case 'pp-create-blp':
typereason = 'Recently deleted [[WP:BLP|BLP]]';
typereason = 'Recently deleted [[MP:BLP|BLP]]';
break;
break;
case 'pp-create-salt':
case 'pp-create-salt':
第8,820行: 第8,820行:
if (text.length === originalTextLength)
if (text.length === originalTextLength)
{
{
statusElement.error( 'Could not find relevant "current requests for ..." heading on WP:RFPP. Aborting.' );
statusElement.error( 'Could not find relevant "current requests for ..." heading on MP:RFPP. Aborting.' );
return;
return;
}
}
第8,854行: 第8,854行:


if ( userIsInGroup( 'sysop' ) ) {
if ( userIsInGroup( 'sysop' ) ) {
$(twAddPortletLink("#", "CSD", "tw-csd", "Delete page according to WP:CSD", "")).click(Twinkle.speedy.callback);
$(twAddPortletLink("#", "CSD", "tw-csd", "Delete page according to MP:CSD", "")).click(Twinkle.speedy.callback);
} else if (twinkleUserAuthorized) {
} else if (twinkleUserAuthorized) {
$(twAddPortletLink("#", "CSD", "tw-csd", "Request speedy deletion according to WP:CSD", "")).click(Twinkle.speedy.callback);
$(twAddPortletLink("#", "CSD", "tw-csd", "Request speedy deletion according to MP:CSD", "")).click(Twinkle.speedy.callback);
} else {
} else {
$(twAddPortletLink("#", 'CSD', 'tw-csd', 'Request speedy deletion according to WP:CSD', '')).click(function() {
$(twAddPortletLink("#", 'CSD', 'tw-csd', 'Request speedy deletion according to MP:CSD', '')).click(function() {
alert("Your account is too new to use Twinkle.");
alert("Your account is too new to use Twinkle.");
});
});
第8,884行: 第8,884行:
dialog.setTitle( "Choose criteria for speedy deletion" );
dialog.setTitle( "Choose criteria for speedy deletion" );
dialog.setScriptName( "Twinkle" );
dialog.setScriptName( "Twinkle" );
dialog.addFooterLink( "Speedy deletion policy", "WP:CSD" );
dialog.addFooterLink( "Speedy deletion policy", "MP:CSD" );
dialog.addFooterLink( "Twinkle help", "WP:TW/DOC#speedy" );
dialog.addFooterLink( "Twinkle help", "MP:TW/DOC#speedy" );
}
}


第9,223行: 第9,223行:
label: 'C1: Empty categories',
label: 'C1: Empty categories',
value: 'catempty',
value: 'catempty',
tooltip: '(no articles or subcategories for at least four days) whose only content has consisted of links to parent categories. This does not apply to categories being discussed on WP:CFD or WP:SFD, or disambiguation categories. If the category isn\'t relatively new, it possibly contained articles earlier, and deeper investigation is needed'
tooltip: '(no articles or subcategories for at least four days) whose only content has consisted of links to parent categories. This does not apply to categories being discussed on MP:CFD or MP:SFD, or disambiguation categories. If the category isn\'t relatively new, it possibly contained articles earlier, and deeper investigation is needed'
},
},
{
{
第9,487行: 第9,487行:
'reason': '',
'reason': '',
// General
// General
'nonsense': '[[WP:PN|Patent nonsense]], meaningless, or incomprehensible',
'nonsense': '[[MP:PN|Patent nonsense]], meaningless, or incomprehensible',
'test': 'Test page',
'test': 'Test page',
'vandalism': '[[WP:Vandalism|Vandalism]]',
'vandalism': '[[MP:Vandalism|Vandalism]]',
'hoax': 'Blatant [[WP:Do not create hoaxes|hoax]]',
'hoax': 'Blatant [[MP:Do not create hoaxes|hoax]]',
'repost': 'Recreation of a page that was [[WP:DEL|deleted]] per a [[WP:XFD|deletion discussion]]',
'repost': 'Recreation of a page that was [[MP:DEL|deleted]] per a [[MP:XFD|deletion discussion]]',
'banned': 'Creation by a [[WP:BLOCK|blocked]] or [[WP:BAN|banned]] user in violation of block or ban',
'banned': 'Creation by a [[MP:BLOCK|blocked]] or [[MP:BAN|banned]] user in violation of block or ban',
'histmerge': 'Temporary deletion in order to merge page histories',
'histmerge': 'Temporary deletion in order to merge page histories',
'move': 'Making way for a non-controversial move',
'move': 'Making way for a non-controversial move',
'xfd': 'Deleting page per result of [[WP:XfD|deletion discussion]]',
'xfd': 'Deleting page per result of [[MP:XfD|deletion discussion]]',
'disambig': 'Unnecessary disambiguation page',
'disambig': 'Unnecessary disambiguation page',
'movedab': 'Redirect to [[WP:MALPLACED|malplaced disambiguation page]]',
'movedab': 'Redirect to [[MP:MALPLACED|malplaced disambiguation page]]',
'copypaste': '[[WP:CPMV|Copy-and-paste]] page move',
'copypaste': '[[MP:CPMV|Copy-and-paste]] page move',
'g6': 'Housekeeping and routine (non-controversial) cleanup',
'g6': 'Housekeeping and routine (non-controversial) cleanup',
'author': 'One author who has requested deletion or blanked the page',
'author': 'One author who has requested deletion or blanked the page',
'g8': 'Page dependent on a deleted or nonexistent page',
'g8': 'Page dependent on a deleted or nonexistent page',
'talk': '[[Help:Talk page|Talk page]] of a deleted or nonexistent page',
'talk': '[[Help:Talk page|Talk page]] of a deleted or nonexistent page',
'subpage': '[[WP:Subpages|Subpage]] of a deleted or nonexistent page',
'subpage': '[[MP:Subpages|Subpage]] of a deleted or nonexistent page',
'redirnone': '[[Wikipedia:Redirect|redirect]] to a deleted or nonexistent page',
'redirnone': '[[Wikipedia:Redirect|redirect]] to a deleted or nonexistent page',
'templatecat': 'Populated by deleted or retargeted templates',
'templatecat': 'Populated by deleted or retargeted templates',
'attack': '[[WP:ATP|Attack page]] or negative unsourced [[WP:BLP|BLP]]',
'attack': '[[MP:ATP|Attack page]] or negative unsourced [[MP:BLP|BLP]]',
'spam': 'Unambiguous [[WP:ADS|advertising]] or promotion',
'spam': 'Unambiguous [[MP:ADS|advertising]] or promotion',
'copyvio': 'Unambiguous [[WP:C|copyright infringement]]',
'copyvio': 'Unambiguous [[MP:C|copyright infringement]]',
// Articles
// Articles
'nocontext': 'Not enough context to identify article\'s subject',
'nocontext': 'Not enough context to identify article\'s subject',
第9,529行: 第9,529行:
'unksource': 'Lack of licensing information',
'unksource': 'Lack of licensing information',
'unfree': 'Unused non-free media',
'unfree': 'Unused non-free media',
'norat': 'Non-free file without [[WP:RAT|fair-use rationale]]',
'norat': 'Non-free file without [[MP:RAT|fair-use rationale]]',
'badfairuse': '[[WP:NFCC|Invalid]] fair-use claim',
'badfairuse': '[[MP:NFCC|Invalid]] fair-use claim',
'nowcommons': 'Media file available on Commons',
'nowcommons': 'Media file available on Commons',
'imgcopyvio': 'File [[WP:COPYVIO|copyright violation]]',
'imgcopyvio': 'File [[MP:COPYVIO|copyright violation]]',
'badfiletype': 'Useless media file',
'badfiletype': 'Useless media file',
'nopermission': 'No evidence of permission',
'nopermission': 'No evidence of permission',
第9,540行: 第9,540行:
'userreq': 'User request to delete page in own userspace',
'userreq': 'User request to delete page in own userspace',
'nouser': 'Userpage or subpage of a nonexistent user',
'nouser': 'Userpage or subpage of a nonexistent user',
'gallery': '[[WP:NFC|Non-free]] [[Help:Gallery|gallery]]',
'gallery': '[[MP:NFC|Non-free]] [[Help:Gallery|gallery]]',
// Templates
// Templates
'policy': 'Template that unambiguously misrepresents established policy',
'policy': 'Template that unambiguously misrepresents established policy',
't3': 'Unused, redundant template',
't3': 'Unused, redundant template',
// Portals
// Portals
'p1': '[[WP:P|Portal]] page that would be subject to speedy deletion as an article',
'p1': '[[MP:P|Portal]] page that would be subject to speedy deletion as an article',
'emptyportal': '[[WP:P|Portal]] without a substantial topic base',
'emptyportal': '[[MP:P|Portal]] without a substantial topic base',
// Redirects
// Redirects
'rediruser': 'Cross-[[WP:NS|namespace]] [[WP:R|redirect]] from mainspace',
'rediruser': 'Cross-[[MP:NS|namespace]] [[MP:R|redirect]] from mainspace',
'redirtypo': 'Recently created, implausible [[WP:R|redirect]]'
'redirtypo': 'Recently created, implausible [[MP:R|redirect]]'
};
};


第9,562行: 第9,562行:
reason = prompt("Enter the deletion summary to use, which will be entered into the deletion log:", "");
reason = prompt("Enter the deletion summary to use, which will be entered into the deletion log:", "");
} else {
} else {
var presetReason = "[[WP:CSD#" + params.normalized.toUpperCase() + "|" + params.normalized.toUpperCase() + "]]: " + params.reason;
var presetReason = "[[MP:CSD#" + params.normalized.toUpperCase() + "|" + params.normalized.toUpperCase() + "]]: " + params.reason;
if (Twinkle.getPref("promptForSpeedyDeletionSummary").indexOf(params.normalized) !== -1) {
if (Twinkle.getPref("promptForSpeedyDeletionSummary").indexOf(params.normalized) !== -1) {
reason = prompt("Enter the deletion summary to use, or press OK to accept the automatically generated one.", presetReason);
reason = prompt("Enter the deletion summary to use, or press OK to accept the automatically generated one.", presetReason);
第9,581行: 第9,581行:
    document.getElementById( 'ca-talk' ).className !== 'new') {
    document.getElementById( 'ca-talk' ).className !== 'new') {
var talkpage = new Wikipedia.page( Wikipedia.namespaces[ mw.config.get('wgNamespaceNumber') + 1 ] + ':' + mw.config.get('wgTitle'), "Deleting talk page" );
var talkpage = new Wikipedia.page( Wikipedia.namespaces[ mw.config.get('wgNamespaceNumber') + 1 ] + ':' + mw.config.get('wgTitle'), "Deleting talk page" );
talkpage.setEditSummary('[[WP:CSD#G8|G8]]: Talk page of deleted page [[' + mw.config.get('wgPageName') + "]]. " + Twinkle.getPref('deletionSummaryAd'));
talkpage.setEditSummary('[[MP:CSD#G8|G8]]: Talk page of deleted page [[' + mw.config.get('wgPageName') + "]]. " + Twinkle.getPref('deletionSummaryAd'));
talkpage.deletePage();
talkpage.deletePage();
}
}
第9,705行: 第9,705行:
var title = $(value).attr('title');
var title = $(value).attr('title');
var page = new Wikipedia.page(title, 'Deleting redirect "' + title + '"');
var page = new Wikipedia.page(title, 'Deleting redirect "' + title + '"');
page.setEditSummary('[[WP:CSD#G8|G8]]: Redirect to deleted page [[' + mw.config.get('wgPageName') + "]]." + Twinkle.getPref('deletionSummaryAd'));
page.setEditSummary('[[MP:CSD#G8|G8]]: Redirect to deleted page [[' + mw.config.get('wgPageName') + "]]." + Twinkle.getPref('deletionSummaryAd'));
page.deletePage(onsuccess);
page.deletePage(onsuccess);
});
});
第9,841行: 第9,841行:
{
{
case 'db':
case 'db':
editsummary = 'Requesting [[WP:CSD|speedy deletion]] with rationale \"' + parameters["1"] + '\".';
editsummary = 'Requesting [[MP:CSD|speedy deletion]] with rationale \"' + parameters["1"] + '\".';
break;
break;
case 'multiple':
case 'multiple':
第9,847行: 第9,847行:
for (i in Twinkle.speedy.dbmultipleCriteria) {
for (i in Twinkle.speedy.dbmultipleCriteria) {
if (typeof Twinkle.speedy.dbmultipleCriteria[i] === 'string') {
if (typeof Twinkle.speedy.dbmultipleCriteria[i] === 'string') {
editsummary += '[[WP:CSD#' + Twinkle.speedy.dbmultipleCriteria[i].toUpperCase() + '|CSD ' + Twinkle.speedy.dbmultipleCriteria[i].toUpperCase() + ']], ';
editsummary += '[[MP:CSD#' + Twinkle.speedy.dbmultipleCriteria[i].toUpperCase() + '|CSD ' + Twinkle.speedy.dbmultipleCriteria[i].toUpperCase() + ']], ';
}
}
}
}
第9,855行: 第9,855行:
case 'g6':
case 'g6':
if (params.value === 'histmerge') {
if (params.value === 'histmerge') {
editsummary = "Requesting history merge with [[" + parameters["1"] + "]] ([[WP:CSD#G6|CSD G6]]).";
editsummary = "Requesting history merge with [[" + parameters["1"] + "]] ([[MP:CSD#G6|CSD G6]]).";
break;
break;
}
}
/* falls through */
/* falls through */
default:
default:
editsummary = "Requesting speedy deletion ([[WP:CSD#" + params.normalized.toUpperCase() + "|CSD " + params.normalized.toUpperCase() + "]]).";
editsummary = "Requesting speedy deletion ([[MP:CSD#" + params.normalized.toUpperCase() + "|CSD " + params.normalized.toUpperCase() + "]]).";
break;
break;
}
}
第9,891行: 第9,891行:
if (!pageobj.exists()) {
if (!pageobj.exists()) {
text =
text =
"This is a log of all [[WP:CSD|speedy deletion]] nominations made by this user using [[WP:TW|Twinkle]]'s CSD module.\n\n" +
"This is a log of all [[MP:CSD|speedy deletion]] nominations made by this user using [[MP:TW|Twinkle]]'s CSD module.\n\n" +
"If you no longer wish to keep this log, you can turn it off using the [[Wikipedia:Twinkle/Preferences|preferences panel]], and " +
"If you no longer wish to keep this log, you can turn it off using the [[Wikipedia:Twinkle/Preferences|preferences panel]], and " +
"nominate this page for speedy deletion under [[WP:CSD#U1|CSD U1]].\n";
"nominate this page for speedy deletion under [[MP:CSD#U1|CSD U1]].\n";
if (userIsInGroup("sysop")) {
if (userIsInGroup("sysop")) {
text += "\nThis log does not track outright speedy deletions made using Twinkle.\n";
text += "\nThis log does not track outright speedy deletions made using Twinkle.\n";
第9,908行: 第9,908行:
text += "\n# [[:" + mw.config.get('wgPageName') + "]]: ";
text += "\n# [[:" + mw.config.get('wgPageName') + "]]: ";
if (params.fromDI) {
if (params.fromDI) {
text += "DI [[WP:CSD#" + params.normalized.toUpperCase() + "|CSD " + params.normalized.toUpperCase() + "]] (" + params.type + ")";
text += "DI [[MP:CSD#" + params.normalized.toUpperCase() + "|CSD " + params.normalized.toUpperCase() + "]] (" + params.type + ")";
} else {
} else {
switch (params.normalized)
switch (params.normalized)
第9,919行: 第9,919行:
for (var i in Twinkle.speedy.dbmultipleCriteria) {
for (var i in Twinkle.speedy.dbmultipleCriteria) {
if (typeof Twinkle.speedy.dbmultipleCriteria[i] === 'string') {
if (typeof Twinkle.speedy.dbmultipleCriteria[i] === 'string') {
text += '[[WP:CSD#' + Twinkle.speedy.dbmultipleCriteria[i].toUpperCase() + '|' + Twinkle.speedy.dbmultipleCriteria[i].toUpperCase() + ']], ';
text += '[[MP:CSD#' + Twinkle.speedy.dbmultipleCriteria[i].toUpperCase() + '|' + Twinkle.speedy.dbmultipleCriteria[i].toUpperCase() + ']], ';
}
}
}
}
第9,926行: 第9,926行:
break;
break;
default:
default:
text += "[[WP:CSD#" + params.normalized.toUpperCase() + "|CSD " + params.normalized.toUpperCase() + "]] ({{tl|db-" + params.value + "}})";
text += "[[MP:CSD#" + params.normalized.toUpperCase() + "|CSD " + params.normalized.toUpperCase() + "]] ({{tl|db-" + params.value + "}})";
break;
break;
}
}
第10,347行: 第10,347行:
Window.setTitle( "Unlink backlinks" );
Window.setTitle( "Unlink backlinks" );
Window.setScriptName( "Twinkle" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#unlink" );
Window.addFooterLink( "Twinkle help", "MP:TW/DOC#unlink" );


var form = new QuickForm( Twinkle.unlink.callback.evaluate );
var form = new QuickForm( Twinkle.unlink.callback.evaluate );
第10,471行: 第10,471行:
type: 'div',
type: 'div',
label: "Selected namespaces: " + namespaces.join(', '),
label: "Selected namespaces: " + namespaces.join(', '),
tooltip: "You can change this with your Twinkle preferences, at [[WP:TWPREFS]]"
tooltip: "You can change this with your Twinkle preferences, at [[MP:TWPREFS]]"
});
});
if ($(xmlDoc).find('query-continue').length) {
if ($(xmlDoc).find('query-continue').length) {
第10,503行: 第10,503行:
type: 'div',
type: 'div',
label: "Selected namespaces: " + namespaces.join(', '),
label: "Selected namespaces: " + namespaces.join(', '),
tooltip: "You can change this with your Twinkle preferences, at [[WP:TWPREFS]]"
tooltip: "You can change this with your Twinkle preferences, at [[MP:TWPREFS]]"
});
});
if ($(xmlDoc).find('query-continue').length) {
if ($(xmlDoc).find('query-continue').length) {
第10,611行: 第10,611行:
Window.setTitle( "Warn/notify user" );
Window.setTitle( "Warn/notify user" );
Window.setScriptName( "Twinkle" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "Choosing a warning level", "WP:UWUL#Levels" );
Window.addFooterLink( "Choosing a warning level", "MP:UWUL#Levels" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#warn" );
Window.addFooterLink( "Twinkle help", "MP:TW/DOC#warn" );


var form = new QuickForm( Twinkle.warn.callback.evaluate );
var form = new QuickForm( Twinkle.warn.callback.evaluate );
第11,437行: 第11,437行:
},
},
"uw-uaa": {  
"uw-uaa": {  
label:"Reporting of username to WP:UAA not accepted",  
label:"Reporting of username to MP:UAA not accepted",  
summary:"Notice: Reporting of username to WP:UAA not accepted"  
summary:"Notice: Reporting of username to MP:UAA not accepted"  
},
},
"uw-userspacenoindex": {  
"uw-userspacenoindex": {  
第11,570行: 第11,570行:
"uw-aeblock": {
"uw-aeblock": {
'label':"Arbitration enforcement block",
'label':"Arbitration enforcement block",
'summary':"You have been blocked from editing for violating an [[WP:Arbitration|arbitration decision]] with your edits"
'summary':"You have been blocked from editing for violating an [[MP:Arbitration|arbitration decision]] with your edits"
},
},
"uw-adblock": {
"uw-adblock": {
'label':"Advertising block",
'label':"Advertising block",
'summary':"You have been blocked from editing for [[WP:SOAP|advertising or self-promotion]]"
'summary':"You have been blocked from editing for [[MP:SOAP|advertising or self-promotion]]"
},
},
"uw-sblock": {
"uw-sblock": {
'label':"Spam block",
'label':"Spam block",
'summary':"You have been blocked from editing for continuing to add [[WP:SPAM|spam links]]"
'summary':"You have been blocked from editing for continuing to add [[MP:SPAM|spam links]]"
},
},
"uw-soablock": {
"uw-soablock": {
'label':"Spam/advertising-only account block",
'label':"Spam/advertising-only account block",
'summary':"You have been indefinitely blocked from editing because your account is being used only for [[WP:SPAM|spam, advertising, or promotion]]"
'summary':"You have been indefinitely blocked from editing because your account is being used only for [[MP:SPAM|spam, advertising, or promotion]]"
},
},
"uw-vblock": {
"uw-vblock": {
'label':"Vandalism block",
'label':"Vandalism block",
'summary':"You have been blocked from editing for persistent [[WP:VAND|vandalism]]"
'summary':"You have been blocked from editing for persistent [[MP:VAND|vandalism]]"
},
},
"uw-voablock": {
"uw-voablock": {
'label':"Vandalism-only account block",
'label':"Vandalism-only account block",
'summary':"You have been indefinitely blocked from editing because your account is being [[WP:VOA|used only for vandalism]]"
'summary':"You have been indefinitely blocked from editing because your account is being [[MP:VOA|used only for vandalism]]"
},
},
"uw-bioblock": {
"uw-bioblock": {
'label':"BLP violations",
'label':"BLP violations",
'summary':"You have been blocked from editing for violations of Wikipedia's [[WP:BLP|biographies of living persons policy]]"
'summary':"You have been blocked from editing for violations of Wikipedia's [[MP:BLP|biographies of living persons policy]]"
},
},
"uw-npblock": {
"uw-npblock": {
'label':"Creating nonsense pages block",
'label':"Creating nonsense pages block",
'summary':"You have been blocked from editing for creating [[WP:PN|nonsense pages]]"
'summary':"You have been blocked from editing for creating [[MP:PN|nonsense pages]]"
},
},
"uw-myblock": {
"uw-myblock": {
'label':"Social networking block",
'label':"Social networking block",
'summary':"You have been blocked from editing for using user and/or article pages as a [[WP:NOTMYSPACE|blog, web host, social networking site or forum]]"
'summary':"You have been blocked from editing for using user and/or article pages as a [[MP:NOTMYSPACE|blog, web host, social networking site or forum]]"
},
},
"uw-copyrightblock": {
"uw-copyrightblock": {
'label':"Copyright violation block",
'label':"Copyright violation block",
'summary':"You have been blocked from editing for continued [[WP:COPYVIO|copyright infringement]]"
'summary':"You have been blocked from editing for continued [[MP:COPYVIO|copyright infringement]]"
},
},
"uw-dblock": {
"uw-dblock": {
'label':"Deletion/removal of content block",
'label':"Deletion/removal of content block",
'summary':"You have been blocked from editing for continued [[WP:VAND|removal of material]]"
'summary':"You have been blocked from editing for continued [[MP:VAND|removal of material]]"
},
},
"uw-efblock": {
"uw-efblock": {
'label':"Edit filter-related block",
'label':"Edit filter-related block",
'summary':"You have been blocked from editing for making disruptive edits that repeatedly triggered the [[WP:EF|edit filter]]"
'summary':"You have been blocked from editing for making disruptive edits that repeatedly triggered the [[MP:EF|edit filter]]"
},
},
"uw-ewblock": {
"uw-ewblock": {
'label':"Edit warring block",
'label':"Edit warring block",
'summary':"You have been blocked from editing to prevent further [[WP:DE|disruption]] caused by your engagement in an [[WP:EW|edit war]]"
'summary':"You have been blocked from editing to prevent further [[MP:DE|disruption]] caused by your engagement in an [[MP:EW|edit war]]"
},
},
"uw-3block": {
"uw-3block": {
'label':"Three-revert rule violation block",
'label':"Three-revert rule violation block",
'summary':"You have been blocked from editing for your [[WP:DE|disruption]] caused by [[WP:EW|edit warring]] and violation of the [[WP:3RR|three-revert rule]]"
'summary':"You have been blocked from editing for your [[MP:DE|disruption]] caused by [[MP:EW|edit warring]] and violation of the [[MP:3RR|three-revert rule]]"
},
},
"uw-botblock": {
"uw-botblock": {
'label':"Unapproved bot block",
'label':"Unapproved bot block",
'summary':"You have been blocked from editing because it appears you are running a [[WP:BOT|bot script]] without [[WP:BRFA|approval]]"
'summary':"You have been blocked from editing because it appears you are running a [[MP:BOT|bot script]] without [[MP:BRFA|approval]]"
},
},
"uw-ublock": {
"uw-ublock": {
'label':"Username soft block",
'label':"Username soft block",
'summary':"You have been indefinitely blocked from editing because your username is a violation of the [[WP:U|username policy]]"
'summary':"You have been indefinitely blocked from editing because your username is a violation of the [[MP:U|username policy]]"
},
},
"uw-uhblock": {
"uw-uhblock": {
'label':"Username hard block",
'label':"Username hard block",
'summary':"You have been indefinitely blocked from editing because your username is a blatant violation of the [[WP:U|username policy]]"
'summary':"You have been indefinitely blocked from editing because your username is a blatant violation of the [[MP:U|username policy]]"
},
},
"uw-softerblock": {
"uw-softerblock": {
'label':"Promotional username soft block",
'label':"Promotional username soft block",
'summary':"You have been indefinitely blocked from editing because your [[WP:U|username]] gives the impression that the account represents a group, organization or website"
'summary':"You have been indefinitely blocked from editing because your [[MP:U|username]] gives the impression that the account represents a group, organization or website"
},
},
"uw-causeblock": {
"uw-causeblock": {
'label':"Promotional username soft block, for charitable causes and social service organizations",
'label':"Promotional username soft block, for charitable causes and social service organizations",
'summary':"You have been indefinitely blocked from editing because your [[WP:U|username]] gives the impression that the account represents a group, organization or website"
'summary':"You have been indefinitely blocked from editing because your [[MP:U|username]] gives the impression that the account represents a group, organization or website"
},
},
"uw-botublock": {
"uw-botublock": {
'label':"Bot username soft block",
'label':"Bot username soft block",
'summary':"You have been indefinitely blocked from editing because your [[WP:U|username]] indicates this is a [[WP:BOT|bot]] account, which is currently not approved"
'summary':"You have been indefinitely blocked from editing because your [[MP:U|username]] indicates this is a [[MP:BOT|bot]] account, which is currently not approved"
},
},
"uw-memorialblock": {
"uw-memorialblock": {
'label':"Memorial username soft block",
'label':"Memorial username soft block",
'summary':"You have been indefinitely blocked from editing because your [[WP:U|username]] indicates this account may be used as a memorial or tribute to someone"
'summary':"You have been indefinitely blocked from editing because your [[MP:U|username]] indicates this account may be used as a memorial or tribute to someone"
},
},
"uw-ublock-famous": {
"uw-ublock-famous": {
'label':"Famous username soft block",
'label':"Famous username soft block",
'summary':"You have been indefinitely blocked from editing because your [[WP:U|username]] matches the name of a well-known living individual"
'summary':"You have been indefinitely blocked from editing because your [[MP:U|username]] matches the name of a well-known living individual"
},
},
"uw-ublock-double": {
"uw-ublock-double": {
'label':"Similar username soft block",
'label':"Similar username soft block",
'summary':"You have been indefinitely blocked from editing because your [[WP:U|username]] is too similar to the username of another Wikipedia user"
'summary':"You have been indefinitely blocked from editing because your [[MP:U|username]] is too similar to the username of another Wikipedia user"
},
},
"uw-uhblock-double": {
"uw-uhblock-double": {
'label':"Username impersonation hard block",
'label':"Username impersonation hard block",
'summary':"You have been indefinitely blocked from editing because your [[WP:U|username]] appears to impersonate another Wikipedia user"
'summary':"You have been indefinitely blocked from editing because your [[MP:U|username]] appears to impersonate another Wikipedia user"
},
},
"uw-vaublock": {
"uw-vaublock": {
'label':"Vandalism-only account and username hard block",
'label':"Vandalism-only account and username hard block",
'summary':"You have been indefinitely blocked from editing because your account is being [[WP:VOA|used only for vandalism]] and your username is a blatant violation of the [[WP:U|username policy]]"
'summary':"You have been indefinitely blocked from editing because your account is being [[MP:VOA|used only for vandalism]] and your username is a blatant violation of the [[MP:U|username policy]]"
},
},
"uw-spamublock": {
"uw-spamublock": {
'label':"Spam/advertising-only account and promotional username hard block",
'label':"Spam/advertising-only account and promotional username hard block",
'summary':"You have been indefinitely blocked from editing because your account is being used only for [[WP:SPAM|spam or advertising]] and your username is a violation of the [[WP:U|username policy]]"
'summary':"You have been indefinitely blocked from editing because your account is being used only for [[MP:SPAM|spam or advertising]] and your username is a violation of the [[MP:U|username policy]]"
},
},
"uw-compblock": {
"uw-compblock": {
'label':"Possible compromised account block",
'label':"Possible compromised account block",
'summary':"You have been indefinitely blocked from editing because it is believed that your [[WP:SECURE|account has been compromised]]"
'summary':"You have been indefinitely blocked from editing because it is believed that your [[MP:SECURE|account has been compromised]]"
},
},
"uw-lblock": {
"uw-lblock": {
'label':"Legal threat block",
'label':"Legal threat block",
'summary':"You have been blocked from editing for making [[WP:NLT|legal threats or taking legal action]]"
'summary':"You have been blocked from editing for making [[MP:NLT|legal threats or taking legal action]]"
},
},
"uw-hblock": {
"uw-hblock": {
'label':"Harassment block",
'label':"Harassment block",
'summary':"You have been blocked from editing for attempting to [[WP:HARASS|harass]] other users"
'summary':"You have been blocked from editing for attempting to [[MP:HARASS|harass]] other users"
},
},
"uw-pinfoblock": {
"uw-pinfoblock": {
'label':"Personal information exposure block",
'label':"Personal information exposure block",
'summary':"You have been blocked from editing for [[WP:OUTING|posting personal information]] of another editor"
'summary':"You have been blocked from editing for [[MP:OUTING|posting personal information]] of another editor"
},
},
"uw-deoablock": {
"uw-deoablock": {
'label':"Disruption/trolling only account block",
'label':"Disruption/trolling only account block",
'summary':"You have been indefinitely blocked from editing because your account is being used only for [[WP:DE|trolling, disruption or harassment]]"
'summary':"You have been indefinitely blocked from editing because your account is being used only for [[MP:DE|trolling, disruption or harassment]]"
},
},
"uw-block-onlyfor": {
"uw-block-onlyfor": {
'label':"Bad-faith single purpose account",
'label':"Bad-faith single purpose account",
'summary':"You have been indefinitely blocked from editing because your account is a [[WP:SPA|single purpose account]] being [[WP:DE|used only for disruptive editing]]"
'summary':"You have been indefinitely blocked from editing because your account is a [[MP:SPA|single purpose account]] being [[MP:DE|used only for disruptive editing]]"
},
},
"uw-spoablock": {
"uw-spoablock": {
'label':"Sockpuppet account block",
'label':"Sockpuppet account block",
'summary':"You have been indefinitely blocked from editing because your account is being used only for [[WP:SOCK|sock puppetry or meat puppetry]]"
'summary':"You have been indefinitely blocked from editing because your account is being used only for [[MP:SOCK|sock puppetry or meat puppetry]]"
}
}
}
}
第12,196行: 第12,196行:
Window.setTitle( "Nominate for deletion (XfD)" );
Window.setTitle( "Nominate for deletion (XfD)" );
Window.setScriptName( "Twinkle" );
Window.setScriptName( "Twinkle" );
Window.addFooterLink( "About deletion discussions", "WP:XFD" );
Window.addFooterLink( "About deletion discussions", "MP:XFD" );
Window.addFooterLink( "Twinkle help", "WP:TW/DOC#xfd" );
Window.addFooterLink( "Twinkle help", "MP:TW/DOC#xfd" );


var form = new QuickForm( Twinkle.xfd.callback.evaluate );
var form = new QuickForm( Twinkle.xfd.callback.evaluate );
第12,350行: 第12,350行:
} );
} );
var linknode = document.createElement('a');
var linknode = document.createElement('a');
linknode.setAttribute("href", mw.util.getUrl("WP:SFD") );
linknode.setAttribute("href", mw.util.getUrl("MP:SFD") );
linknode.appendChild(document.createTextNode('WP:SFD'));
linknode.appendChild(document.createTextNode('MP:SFD'));
work_area.append( {
work_area.append( {
type: 'div',
type: 'div',
第12,678行: 第12,678行:
var notifytext = "\n{{subst:AFDWarning|1=" + mw.config.get('wgPageName') + ( params.numbering !== '' ? '|order=&#32;' + params.numbering : '' ) + "}} ~~~~";
var notifytext = "\n{{subst:AFDWarning|1=" + mw.config.get('wgPageName') + ( params.numbering !== '' ? '|order=&#32;' + params.numbering : '' ) + "}} ~~~~";
usertalkpage.setAppendText(notifytext);
usertalkpage.setAppendText(notifytext);
usertalkpage.setEditSummary("Notification: listing at [[WP:AFD|articles for deletion]] of [[" + mw.config.get('wgPageName') + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setEditSummary("Notification: listing at [[MP:AFD|articles for deletion]] of [[" + mw.config.get('wgPageName') + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setCreateOption('recreate');
usertalkpage.setCreateOption('recreate');
switch (Twinkle.getPref('xfdWatchUser')) {
switch (Twinkle.getPref('xfdWatchUser')) {
第12,749行: 第12,749行:
var notifytext = "\n{{subst:tfdnotice|1=" + mw.config.get('wgTitle') + "}} ~~~~";
var notifytext = "\n{{subst:tfdnotice|1=" + mw.config.get('wgTitle') + "}} ~~~~";
usertalkpage.setAppendText(notifytext);
usertalkpage.setAppendText(notifytext);
usertalkpage.setEditSummary("Notification: nomination at [[WP:TFD|templates for discussion]] of [[" + mw.config.get('wgPageName') + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setEditSummary("Notification: nomination at [[MP:TFD|templates for discussion]] of [[" + mw.config.get('wgPageName') + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setCreateOption('recreate');
usertalkpage.setCreateOption('recreate');
switch (Twinkle.getPref('xfdWatchUser')) {
switch (Twinkle.getPref('xfdWatchUser')) {
第12,934行: 第12,934行:
var notifytext = "\n{{subst:MFDWarning|1=" + mw.config.get('wgPageName') + ( params.numbering !== '' ? '|order=&#32;' + params.numbering : '' ) + "}} ~~~~";
var notifytext = "\n{{subst:MFDWarning|1=" + mw.config.get('wgPageName') + ( params.numbering !== '' ? '|order=&#32;' + params.numbering : '' ) + "}} ~~~~";
usertalkpage.setAppendText(notifytext);
usertalkpage.setAppendText(notifytext);
usertalkpage.setEditSummary("Notification: listing at [[WP:MFD|miscellany for deletion]] of [[" + mw.config.get('wgPageName') + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setEditSummary("Notification: listing at [[MP:MFD|miscellany for deletion]] of [[" + mw.config.get('wgPageName') + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setCreateOption('recreate');
usertalkpage.setCreateOption('recreate');
switch (Twinkle.getPref('xfdWatchUser')) {
switch (Twinkle.getPref('xfdWatchUser')) {
第12,971行: 第12,971行:
var notifytext = "\n{{subst:idw|1=" + mw.config.get('wgTitle') + "}}";
var notifytext = "\n{{subst:idw|1=" + mw.config.get('wgTitle') + "}}";
usertalkpage.setAppendText(notifytext);
usertalkpage.setAppendText(notifytext);
usertalkpage.setEditSummary("Notification: listing at [[WP:FFD|files for deletion]] of [[" + mw.config.get('wgPageName') + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setEditSummary("Notification: listing at [[MP:FFD|files for deletion]] of [[" + mw.config.get('wgPageName') + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setCreateOption('recreate');
usertalkpage.setCreateOption('recreate');
switch (Twinkle.getPref('xfdWatchUser')) {
switch (Twinkle.getPref('xfdWatchUser')) {
第13,042行: 第13,042行:


pageobj.setPageText("{{puf|help=off|log=" + params.date + "}}\n" + text);
pageobj.setPageText("{{puf|help=off|log=" + params.date + "}}\n" + text);
pageobj.setEditSummary("Listed at [[WP:PUF|possibly unfree files]]: [[" + params.logpage + "#" + mw.config.get('wgPageName') + "]]." + Twinkle.getPref('summaryAd'));
pageobj.setEditSummary("Listed at [[MP:PUF|possibly unfree files]]: [[" + params.logpage + "#" + mw.config.get('wgPageName') + "]]." + Twinkle.getPref('summaryAd'));
switch (Twinkle.getPref('xfdWatchPage')) {
switch (Twinkle.getPref('xfdWatchPage')) {
case 'yes':
case 'yes':
第13,082行: 第13,082行:
var notifytext = "\n{{subst:idw-puf|1=" + mw.config.get('wgTitle') + "}} ~~~~";
var notifytext = "\n{{subst:idw-puf|1=" + mw.config.get('wgTitle') + "}} ~~~~";
usertalkpage.setAppendText(notifytext);
usertalkpage.setAppendText(notifytext);
usertalkpage.setEditSummary("Notification: listing at [[WP:PUF|possibly unfree files]] of [[" + mw.config.get('wgPageName') + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setEditSummary("Notification: listing at [[MP:PUF|possibly unfree files]] of [[" + mw.config.get('wgPageName') + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setCreateOption('recreate');
usertalkpage.setCreateOption('recreate');
switch (Twinkle.getPref('xfdWatchUser')) {
switch (Twinkle.getPref('xfdWatchUser')) {
第13,111行: 第13,111行:
case 'cfd':
case 'cfd':
added_data = "{{subst:cfd}}";
added_data = "{{subst:cfd}}";
editsummary = "Category being considered for deletion in accordance with [[WP:CDP|CDP]].";
editsummary = "Category being considered for deletion in accordance with [[MP:CDP|CDP]].";
break;
break;
case 'cfm':
case 'cfm':
added_data = "{{subst:cfm|" + params.target.replace('Category:','') + "}}";
added_data = "{{subst:cfm|" + params.target.replace('Category:','') + "}}";
editsummary = "Category being considered for merging in accordance with [[WP:CDP|CDP]].";
editsummary = "Category being considered for merging in accordance with [[MP:CDP|CDP]].";
break;
break;
case 'cfr':
case 'cfr':
added_data = "{{subst:cfr|" + params.target.replace('Category:','') + "}}";
added_data = "{{subst:cfr|" + params.target.replace('Category:','') + "}}";
editsummary = "Category being considered for renaming in accordance with [[WP:CDP|CDP]].";
editsummary = "Category being considered for renaming in accordance with [[MP:CDP|CDP]].";
break;
break;
case 'cfc':
case 'cfc':
added_data = "{{subst:cfc|" + params.target + "}}";
added_data = "{{subst:cfc|" + params.target + "}}";
editsummary = "Category being considered for conversion to an article in accordance with [[WP:CDP|CDP]].";
editsummary = "Category being considered for conversion to an article in accordance with [[MP:CDP|CDP]].";
break;
break;
default:
default:
第13,203行: 第13,203行:
var notifytext = "\n{{subst:CFDNote|1=" + mw.config.get('wgPageName') + "}} ~~~~";
var notifytext = "\n{{subst:CFDNote|1=" + mw.config.get('wgPageName') + "}} ~~~~";
usertalkpage.setAppendText(notifytext);
usertalkpage.setAppendText(notifytext);
usertalkpage.setEditSummary("Notification: listing at [[WP:CFD|categories for discussion]] of [[" + mw.config.get('wgPageName') + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setEditSummary("Notification: listing at [[MP:CFD|categories for discussion]] of [[" + mw.config.get('wgPageName') + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setCreateOption('recreate');
usertalkpage.setCreateOption('recreate');
switch (Twinkle.getPref('xfdWatchUser')) {
switch (Twinkle.getPref('xfdWatchUser')) {
第13,312行: 第13,312行:
var notifytext = "\n{{subst:RFDNote|1=" + mw.config.get('wgPageName') + "}} ~~~~";
var notifytext = "\n{{subst:RFDNote|1=" + mw.config.get('wgPageName') + "}} ~~~~";
usertalkpage.setAppendText(notifytext);
usertalkpage.setAppendText(notifytext);
usertalkpage.setEditSummary("Notification: listing at [[WP:RFD|redirects for discussion]] of [[" + mw.config.get('wgPageName') + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setEditSummary("Notification: listing at [[MP:RFD|redirects for discussion]] of [[" + mw.config.get('wgPageName') + "]]." + Twinkle.getPref('summaryAd'));
usertalkpage.setCreateOption('recreate');
usertalkpage.setCreateOption('recreate');
switch (Twinkle.getPref('xfdWatchUser')) {
switch (Twinkle.getPref('xfdWatchUser')) {
137

次編輯