MediaWiki:Gadget-twinklespeedy.js: Difference between revisions

m
1 revision: new version of Twinkle
m (1 revision)
m (1 revision: new version of Twinkle)
 
(One intermediate revision by one other user not shown)
Line 27:
}
 
Twinkle.addPortletLink( Twinkle.speedy.callback, "CSD", "tw-csd", Morebits.userIsInGroup('sysop') ? "Delete page according to WPEFD:CSD" : "Request speedy deletion according to WPEFD:CSD" );
};
 
Line 44:
dialog.setTitle( "Choose criteria for speedy deletion" );
dialog.setScriptName( "Twinkle" );
dialog.addFooterLink( "Speedy deletion policy", "WPEFD:CSD" );
dialog.addFooterLink( "Twinkle help", "WPEFD:TW/DOC#speedy" );
 
var form = new Morebits.quickForm( callbackfunc, (Twinkle.getPref('speedySelectionStyle') === 'radioClick' ? 'change' : null) );
Line 317:
label: 'F7: Fair-use media from a commercial image agency which is not the subject of sourced commentary',
value: 'badfairuse', // same as above
tooltip: 'Non-free images or media from a commercial source (e.g., Associated Press, Getty), where the file itself is not the subject of sourced commentary, are considered an invalid claim of fair use and fail the strict requirements of WPEFD:NFCC.'
});
}
Line 434:
label: 'C1: Empty categories',
value: 'catempty',
tooltip: 'Categories that have been unpopulated for at least four days. This does not apply to categories being discussed at WPEFD:CFD, disambiguation categories, and certain other exceptions. If the category isn\'t relatively new, it possibly contained articles earlier, and deeper investigation is needed'
},
{
Line 723:
'reason': '',
// General
'nonsense': '[[WPEFD:PN|Patent nonsense]], meaningless, or incomprehensible',
'test': 'Test page',
'vandalism': '[[WPEFD:Vandalism|Vandalism]]',
'hoax': 'Blatant [[WPEFD:Do not create hoaxes|hoax]]',
'repost': 'Recreation of a page that was [[WPEFD:DEL|deleted]] per a [[WPEFD:XFD|deletion discussion]]',
'banned': 'Creation by a [[WPEFD:BLOCK|blocked]] or [[WPEFD:BAN|banned]] user in violation of block or ban',
'histmerge': 'Temporary deletion in order to merge page histories',
'move': 'Making way for a non-controversial move',
'xfd': 'Deleting page per result of [[WPEFD:XfD|deletion discussion]]',
'disambig': 'Unnecessary disambiguation page',
'movedab': 'Redirect to [[WPEFD:MALPLACED|malplaced disambiguation page]]',
'copypaste': '[[WPEFD:CPMV|Copy-and-paste]] page move',
'g6': 'Housekeeping and routine (non-controversial) cleanup',
'author': 'One author who has requested deletion or blanked the page',
'g8': 'Page dependent on a deleted or nonexistent page',
'talk': '[[Help:Talk page|Talk page]] of a deleted or nonexistent page',
'subpage': '[[WPEFD:Subpages|Subpage]] of a deleted or nonexistent page',
'redirnone': '[[Wikipedia:Redirect|redirect]] to a deleted or nonexistent page',
'templatecat': 'Populated by deleted or retargeted templates',
'imagepage': 'File description page for a file that does not exist',
'attack': '[[WPEFD:ATP|Attack page]] or negative unsourced [[WPEFD:BLP|BLP]]',
'negublp': 'Negative unsourced [[WPEFD:BLP|BLP]]',
'spam': 'Unambiguous [[WPEFD:ADS|advertising]] or promotion',
'copyvio': 'Unambiguous [[WPEFD:C|copyright infringement]]',
'afc': 'Abandoned [[WPEFD:AFC|Articles for creation]] submission',
// Articles
'nocontext': 'Short article without enough context to identify the subject',
Line 770:
'unksource': 'Lack of licensing information',
'unfree': 'Unused non-free media',
'norat': 'Non-free file without [[WPEFD:RAT|fair-use rationale]]',
'badfairuse': 'Violates [[WPEFD:F|non-free use policy]]',
'nowcommons': 'Media file available on Commons',
'imgcopyvio': 'Unambiguous [[WPEFD:COPYVIO|copyright violation]]',
'badfiletype': 'Useless media file (not an image, audio or video)',
'nopermission': 'No evidence of permission',
Line 781:
'userreq': 'User request to delete page in own userspace',
'nouser': 'Userpage or subpage of a nonexistent user',
'gallery': '[[WPEFD:NFC|Non-free]] [[Help:Gallery|gallery]]',
// Templates
'policy': 'Template that unambiguously misrepresents established policy',
Line 787:
't3': 'Unused, redundant template',
// Portals
'p1': '[[WPEFD:P|Portal]] page that would be subject to speedy deletion as an article',
'emptyportal': '[[WPEFD:P|Portal]] without a substantial topic base',
// Redirects
'rediruser': 'Cross-[[WPEFD:NS|namespace]] [[WPEFD:R|redirect]] from mainspace',
'redirtypo': 'Recently created, implausible [[WPEFD:R|redirect]]'
};
 
Line 815:
reason = prompt("Enter the deletion summary to use, which will be entered into the deletion log:", "");
} else {
var presetReason = "[[WPEFD:CSD#" + params.normalized.toUpperCase() + "|" + params.normalized.toUpperCase() + "]]: " + params.reason;
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);
Line 840:
document.getElementById( 'ca-talk' ).className !== 'new') {
var talkpage = new Morebits.wiki.page( Morebits.wikipedia.namespaces[ mw.config.get('wgNamespaceNumber') + 1 ] + ':' + mw.config.get('wgTitle'), "Deleting talk page" );
talkpage.setEditSummary('[[WPEFD:CSD#G8|G8]]: Talk page of deleted page "' + Morebits.pageNameNorm + '"' + Twinkle.getPref('deletionSummaryAd'));
talkpage.deletePage();
// this is ugly, but because of the architecture of wiki.api, it is needed
Line 979:
var title = $(value).attr('title');
var page = new Morebits.wiki.page(title, 'Deleting redirect "' + title + '"');
page.setEditSummary('[[WPEFD:CSD#G8|G8]]: Redirect to deleted page "' + Morebits.pageNameNorm + '"' + Twinkle.getPref('deletionSummaryAd'));
page.deletePage(onsuccess);
});
Line 1,079:
editsummary = 'Requesting speedy deletion (';
$.each(params.normalizeds, function(index, norm) {
editsummary += '[[WPEFD:CSD#' + norm.toUpperCase() + '|CSD ' + norm.toUpperCase() + ']], ';
});
editsummary = editsummary.substr(0, editsummary.length - 2); // remove trailing comma
editsummary += ').';
} else if (params.normalizeds[0] === "db") {
editsummary = 'Requesting [[WPEFD:CSD|speedy deletion]] with rationale \"' + parameters["1"] + '\".';
} else if (params.values[0] === "histmerge") {
editsummary = "Requesting history merge with [[" + parameters["1"] + "]] ([[WPEFD:CSD#G6|CSD G6]]).";
} else {
editsummary = "Requesting speedy deletion ([[WPEFD:CSD#" + params.normalizeds[0].toUpperCase() + "|CSD " + params.normalizeds[0].toUpperCase() + "]]).";
}
 
Line 1,186:
if (!pageobj.exists()) {
text =
"This is a log of all [[WPEFD:CSD|speedy deletion]] nominations made by this user using [[WPEFD: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 " +
"nominate this page for speedy deletion under [[WPEFD:CSD#U1|CSD U1]].\n";
if (Morebits.userIsInGroup("sysop")) {
text += "\nThis log does not track outright speedy deletions made using Twinkle.\n";
Line 1,203:
text += "\n# [[:" + Morebits.pageNameNorm + "]]: ";
if (params.fromDI) {
text += "DI [[WPEFD:CSD#" + params.normalized.toUpperCase() + "|CSD " + params.normalized.toUpperCase() + "]] (" + params.type + ")";
} else {
if (params.normalizeds.length > 1) {
text += "multiple criteria (";
$.each(params.normalizeds, function(index, norm) {
text += "[[WPEFD:CSD#" + norm.toUpperCase() + "|" + norm.toUpperCase() + ']], ';
});
text = text.substr(0, text.length - 2); // remove trailing comma
Line 1,215:
text += "{{tl|db-reason}}";
} else {
text += "[[WPEFD:CSD#" + params.normalizeds[0].toUpperCase() + "|CSD " + params.normalizeds[0].toUpperCase() + "]] ({{tl|db-" + params.values[0] + "}})";
}
}
Line 1,286:
return null;
}
if (deldisc !== "" && deldisc.substring(0, 9) !== "Wikipedia" && deldisc.substring(0, 3) !== "WPEFD:")
{
statelem.error( 'The deletion discussion page name, if provided, must start with "Wikipedia:". Cannot proceed.' );
0

edits