MediaWiki:Gadget-twinklewarn1.js: Revizyonlar arasındaki fark

İçerik silindi İçerik eklendi
k dz.
Son kısım geçmişe dönüş.
1.121. satır:
};
 
 
Twinkle.warn.prev_block_timer = null;
Twinkle.warn.prev_block_reason = null;
Twinkle.warn.prev_article = null;
Twinkle.warn.prev_reason = null;
 
Twinkle.warn.callback.change_category = function twinklewarnCallbackChangeCategory(e) {
 
var value = e.target.value;
var sub_group = e.target.root.sub_group;
Satır 1.131 ⟶ 1.133:
var old_subvalue = sub_group.value;
var old_subvalue_re;
if ( old_subvalue ) {
old_subvalue = old_subvalue.replace(/\d*(im)?$/, '' );
if (value === 'kitchensink') { // Exact match possible in kitchensink menu
old_subvalue_re = new RegExp(mw $.util.escapeRegExpescapeRE( old_subvalue ) + "(\\d*(?:im)?)$" );
} else {
old_subvalue = old_subvalue.replace(/\d*(im)?$/, '');
old_subvalue_re = new RegExp(mw.util.escapeRegExp(old_subvalue) + '(\\d*(?:im)?)$');
}
}
 
while ( sub_group.hasChildNodes()) ){
sub_group.removeChild( sub_group.firstChild );
}
 
var selected = false;
// worker function to create the combo box entries
var createEntries = function( contents, container, wrapInOptgroup, val) {
val = typeof val !== 'undefined' ? val : value; // IE doesn't support default parameters
// level2->2, singlewarn->''; also used to distinguish the
// scaled levels from singlenotice, singlewarn, and custom
var level = val.replace(/^\D+/g, '');
// due to an apparent iOS bug, we have to add an option-group to prevent truncation of text
// (search WT:TW archives for "Problem selecting warnings on an iPhone")
if ( wrapInOptgroup && $.client.profile().platform === '"iphone'" ) {
var wrapperOptgroup = new Morebits.quickForm.element( {
type: 'optgroup',
label: 'Available templates'
} );
wrapperOptgroup = wrapperOptgroup.render();
container.appendChild( wrapperOptgroup );
container = wrapperOptgroup;
}
 
$.each( contents, function( itemKey, itemProperties ) {
var key = (typeof itemKey === "string") ? itemKey : itemProperties.value;
// Skip if the current template doesn't have a version for the current level
 
if (!!level && !itemProperties[val]) {
var selected = false;
return;
if( old_subvalue && old_subvalue_re.test( key ) ) {
selected = true;
}
var key = typeof itemKey === 'string' ? itemKey : itemProperties.value;
var template = key + level;
 
var elem = new Morebits.quickForm.element( {
type: 'option',
label: '"{{'" + templatekey + '"}}: '" + (level ? itemProperties[val].label : itemProperties.label),
value: templatekey,
selected: selected
});
} );
 
var elemRendered = container.appendChild( elem.render() );
// Select item best corresponding to previous selection
$(elemRendered).data("messageData", itemProperties);
if (!selected && old_subvalue && old_subvalue_re.test(template)) {
} );
elem.data.selected = selected = true;
}
var elemRendered = container.appendChild(elem.render());
$(elemRendered).data('messageData', itemProperties);
});
};
 
if( value === "singlenotice" || value === "singlewarn" || value === "block" ) {
switch (value) {
// no categories, just create the options right away
case 'singlenotice':
createEntries( Twinkle.warn.messages[ value ], sub_group, true );
case 'singlewarn':
} else if( value === "custom" ) {
createEntries(Twinkle.warn.messages[value], sub_group, true);
createEntries( Twinkle.getPref("customWarningList"), sub_group, true );
break;
} else {
case 'singlecombined':
// create the option-groups
var unSortedSinglets = $.extend({}, Twinkle.warn.messages.singlenotice, Twinkle.warn.messages.singlewarn);
$.each( Twinkle.warn.messages[ value ], function( groupLabel, groupContents ) {
var sortedSingletMessages = {};
var optgroup = new Morebits.quickForm.element( {
Object.keys(unSortedSinglets).sort().forEach(function(key) {
type: 'optgroup',
sortedSingletMessages[key] = unSortedSinglets[key];
label: groupLabel
});
} );
createEntries(sortedSingletMessages, sub_group, true);
optgroup = optgroup.render();
break;
sub_group.appendChild( optgroup );
case 'custom':
// create the options
createEntries(Twinkle.getPref('customWarningList'), sub_group, true);
createEntries( groupContents, optgroup, false );
break;
} );
case 'kitchensink':
['level1', 'level2', 'level3', 'level4', 'level4im'].forEach(function(lvl) {
Object.values(Twinkle.warn.messages.levels).forEach(function(levelGroup) {
createEntries(levelGroup, sub_group, true, lvl);
});
});
createEntries(Twinkle.warn.messages.singlenotice, sub_group, true);
createEntries(Twinkle.warn.messages.singlewarn, sub_group, true);
createEntries(Twinkle.getPref('customWarningList'), sub_group, true);
break;
case 'level1':
case 'level2':
case 'level3':
case 'level4':
case 'level4im':
// Creates subgroup regardless of whether there is anything to place in it;
// leaves "Removal of deletion tags" empty for 4im
$.each(Twinkle.warn.messages.levels, function(groupLabel, groupContents) {
var optgroup = new Morebits.quickForm.element({
type: 'optgroup',
label: groupLabel
});
optgroup = optgroup.render();
sub_group.appendChild(optgroup);
// create the options
createEntries(groupContents, optgroup, false);
});
break;
default:
alert('Unknown warning group in twinklewarn');
break;
}
 
if( value === 'block' ) {
// clear overridden label on article textbox
// create the block-related fields
Morebits.quickForm.setElementTooltipVisibility(e.target.root.article, true);
var more = new Morebits.quickForm.resetElementLabelelement(e.target.root.article { type: 'div', id: 'block_fields' } );
more.append( {
// hide the big red notice
type: 'input',
$('#tw-warn-red-notice').remove();
name: 'block_timer',
// Trigger custom label/change on main category change
label: 'Engel süresi: ',
Twinkle.warn.callback.change_subcategory(e);
tooltip: 'Engel süresi, örneğin 24 hours, 2 weeks, indefinite vb.'
} );
more.append( {
type: 'input',
name: 'block_reason',
label: '"... yüzünden engellendin" ',
tooltip: 'Varsayılan nedeni değiştirmek için isteğe bağlı bir neden. Yalnızca genel engelleme şablonlarıyla kullanılabilir.'
} );
e.target.root.insertBefore( more.render(), e.target.root.lastChild );
 
// restore saved values of fields
// Use select2 to make the select menu searchable
if (!Twinkle.getPref('oldSelect')warn.prev_block_timer !== null) {
e.target.root.block_timer.value = Twinkle.warn.prev_block_timer;
$('select[name=sub_group]')
Twinkle.warn.prev_block_timer = null;
.select2({
}
width: '100%',
if(Twinkle.warn.prev_block_reason !== null) {
matcher: Morebits.select2.matchers.optgroupFull,
e.target.root.block_reason.value = Twinkle.warn.prev_block_reason;
templateResult: Morebits.select2.highlightSearchMatches,
Twinkle.warn.prev_block_reason = null;
language: {
}
searching: Morebits.select2.queryInterceptor
if(Twinkle.warn.prev_article === null) {
}
Twinkle.warn.prev_article = e.target.root.article.value;
})
}
.change(Twinkle.warn.callback.change_subcategory);
e.target.root.article.disabled = false;
 
$(e.target.root.reason).parent().hide();
$('.select2-selection').keydown(Morebits.select2.autoStart);
e.target.root.previewer.closePreview();
} else if( e.target.root.block_timer ) {
// hide the block-related fields
if(!e.target.root.block_timer.disabled && Twinkle.warn.prev_block_timer === null) {
Twinkle.warn.prev_block_timer = e.target.root.block_timer.value;
}
if(!e.target.root.block_reason.disabled && Twinkle.warn.prev_block_reason === null) {
Twinkle.warn.prev_block_reason = e.target.root.block_reason.value;
}
 
// hack to fix something really weird - removed elements seem to somehow keep an association with the form
mw.util.addCSS(
e.target.root.block_reason = null;
// prevent dropdown from appearing behind the dialog, just in case
'.select2-container { z-index: 10000; }' +
 
$(e.target.root).find("#block_fields").remove();
// Increase height
'.select2-container .select2-dropdown .select2-results > .select2-results__options { max-height: 350px; }' +
 
if(e.target.root.article.disabled && Twinkle.warn.prev_article !== null) {
// Reduce padding
e.target.root.article.value = Twinkle.warn.prev_article;
'.select2-results .select2-results__option { padding-top: 1px; padding-bottom: 1px; }' +
Twinkle.warn.prev_article = null;
'.select2-results .select2-results__group { padding-top: 1px; padding-bottom: 1px; } ' +
}
e.target.root.article.disabled = false;
 
$(e.target.root.reason).parent().show();
// Adjust font size
e.target.root.previewer.closePreview();
'.select2-container .select2-dropdown .select2-results { font-size: 13px; }' +
'.select2-container .selection .select2-selection__rendered { font-size: 13px; }'
);
}
 
// clear overridden label on article textbox
Morebits.quickForm.setElementTooltipVisibility(e.target.root.article, true);
Morebits.quickForm.resetElementLabel(e.target.root.article);
 
// hide the big red notice
$("#tw-warn-red-notice").remove();
};
 
Satır 1.280 ⟶ 1.263:
var value = e.target.form.sub_group.value;
 
if( main_group === 'singlenotice' || main_group === 'singlewarn' ) {
// Tags that don't take a linked article, but something else (often a username).
if( value === 'uw-bite' || value === 'uw-username' || value === 'uw-socksuspect' ) {
// The value of each tag is the label next to the input field
if(Twinkle.warn.prev_article === null) {
var notLinkedArticle = {
'uw-agf-sock': 'Optional username of other account (without User:) ',
'uw-bite': "Username of 'bitten' user (without User:) ",
'uw-socksuspect': 'Username of sock master, if known (without User:) ',
'uw-username': 'Username violates policy because... ',
'uw-aiv': 'Optional username that was reported (without User:) '
};
 
if (['singlenotice', 'singlewarn', 'singlecombined', 'kitchensink'].indexOf(main_group) !== -1) {
if (notLinkedArticle[value]) {
if (Twinkle.warn.prev_article === null) {
Twinkle.warn.prev_article = e.target.form.article.value;
}
e.target.form.article.notArticle = true;
e.target.form.article.value = '';
} else if( e.target.form.article.notArticle ) {
 
if(Twinkle.warn.prev_article !== null) {
// change form labels according to the warning selected
Morebits.quickForm.setElementTooltipVisibility(e.target.form.article, false);
Morebits.quickForm.overrideElementLabel(e.target.form.article, notLinkedArticle[value]);
} else if (e.target.form.article.notArticle) {
if (Twinkle.warn.prev_article !== null) {
e.target.form.article.value = Twinkle.warn.prev_article;
Twinkle.warn.prev_article = null;
}
e.target.form.article.notArticle = false;
Morebits.quickForm.setElementTooltipVisibility(e.target.form.article, true);
Morebits.quickForm.resetElementLabel(e.target.form.article);
}
} else if( main_group === 'block' ) {
if( Twinkle.warn.messages.block[value].indefinite ) {
if(Twinkle.warn.prev_block_timer === null) {
Twinkle.warn.prev_block_timer = e.target.form.block_timer.value;
}
e.target.form.block_timer.disabled = true;
e.target.form.block_timer.value = 'indefinite';
} else if( e.target.form.block_timer.disabled ) {
if(Twinkle.warn.prev_block_timer !== null) {
e.target.form.block_timer.value = Twinkle.warn.prev_block_timer;
Twinkle.warn.prev_block_timer = null;
}
e.target.form.block_timer.disabled = false;
}
 
if( Twinkle.warn.messages.block[value].pageParam ) {
if(Twinkle.warn.prev_article !== null) {
e.target.form.article.value = Twinkle.warn.prev_article;
Twinkle.warn.prev_article = null;
}
e.target.form.article.disabled = false;
} else if( !e.target.form.article.disabled ) {
if(Twinkle.warn.prev_article === null) {
Twinkle.warn.prev_article = e.target.form.article.value;
}
e.target.form.article.disabled = true;
e.target.form.article.value = '';
}
 
if( Twinkle.warn.messages.block[value].reasonParam ) {
if(Twinkle.warn.prev_block_reason !== null) {
e.target.form.block_reason.value = Twinkle.warn.prev_block_reason;
Twinkle.warn.prev_block_reason = null;
}
e.target.form.block_reason.disabled = false;
} else if( !e.target.form.block_reason.disabled ) {
if(Twinkle.warn.prev_block_reason === null) {
Twinkle.warn.prev_block_reason = e.target.form.block_reason.value;
}
e.target.form.block_reason.disabled = true;
e.target.form.block_reason.value = '';
}
}
 
// change form labels according to the warning selected
if (value === "uw-socksuspect") {
Morebits.quickForm.setElementTooltipVisibility(e.target.form.article, false);
Morebits.quickForm.overrideElementLabel(e.target.form.article, "Username of sock master, if known (without User:) ");
} else if (value === "uw-username") {
Morebits.quickForm.setElementTooltipVisibility(e.target.form.article, false);
Morebits.quickForm.overrideElementLabel(e.target.form.article, "Username violates policy because... ");
} else if (value === "uw-bite") {
Morebits.quickForm.setElementTooltipVisibility(e.target.form.article, false);
Morebits.quickForm.overrideElementLabel(e.target.form.article, "Username of 'bitten' user (without User:) ");
} else {
Morebits.quickForm.setElementTooltipVisibility(e.target.form.article, true);
Morebits.quickForm.resetElementLabel(e.target.form.article);
}
 
// add big red notice, warning users about how to use {{uw-[coi-]username}} appropriately
$('"#tw-warn-red-notice'").remove();
 
var $redWarning;
if (value === '"uw-username'") {
$redWarning = $("<div style='color: red;' id='tw-warn-red-notice'>{{uw-username}} should <b>not</b> be used for <b>blatant</b> username policy violations. " +
"Blatant violations should be reported directly to UAA (via Twinkle's ARV tab). " +
'"{{uw-username}} should only be used in edge cases in order to engage in discussion with the user.</div>'");
$redWarning.insertAfter(Morebits.quickForm.getElementLabelObject(e.target.form.reasonGroup));
} else if (value === '"uw-coi-username'") {
$redWarning = $("<div style='color: red;' id='tw-warn-red-notice'>{{uw-coi-username}} should <b>not</b> be used for <b>blatant</b> username policy violations. " +
"Blatant violations should be reported directly to UAA (via Twinkle's ARV tab). " +
'"{{uw-coi-username}} should only be used in edge cases in order to engage in discussion with the user.</div>'");
$redWarning.insertAfter(Morebits.quickForm.getElementLabelObject(e.target.form.reasonGroup));
}
Satır 1.331 ⟶ 1.355:
Twinkle.warn.callbacks = {
getWarningWikitext: function(templateName, article, reason, isCustom) {
var text = '"{{subst:'" + templateName;
 
// add linked article for user warnings
if (article) {
// add linked article for user warnings (non-block templates)
// c&pmove has the source as the first parameter
text += '|1=' + article;
if (templateName === 'uw-c&pmove') {
text += '|to=' + article;
} else {
text += '|1=' + article;
}
}
if (reason && !isCustom) {
// add extra message for non-block templates
if (templateName === 'uw-csd' || templateName === 'uw-probation' ||
templateName === 'uw-userspacenoindex' || templateName === 'uw-userpage') {
Satır 1.358 ⟶ 1.377:
}
 
return text + ' ~~~~';
},
getBlockNoticeWikitext: function(templateName, article, blockTime, blockReason, isIndefTemplate) {
var text = "{{subst:" + templateName;
 
if (article && Twinkle.warn.messages.block[templateName].pageParam) {
text += '|page=' + article;
}
 
if (!/te?mp|^\s*$|min/.exec(blockTime) && !isIndefTemplate) {
if (/indef|\*|max/.exec(blockTime)) {
text += '|indef=yes';
} else {
text += '|time=' + blockTime;
}
}
 
if (blockReason) {
text += '|reason=' + blockReason;
}
 
text += "|sig=true}}";
return text;
},
preview: function(form) {
Satır 1.365 ⟶ 1.406:
var templatetext;
 
if (templatename in Twinkle.warn.messages.block) {
templatetext = Twinkle.warn.callbacks.getWarningWikitext(templatename, linkedarticle,
templatetext = Twinkle.warn.callbacks.getBlockNoticeWikitext(templatename, linkedarticle, form.block_timer.value,
form.reason.value, form.main_group.value === 'custom');
form.block_reason.value, Twinkle.warn.messages.block[templatename].indefinite);
} else {
templatetext = Twinkle.warn.callbacks.getWarningWikitext(templatename, linkedarticle,
form.reason.value, form.main_group.value === 'custom');
}
 
form.previewer.beginRender(templatetext, 'User_talk:' + mw.config.get('wgRelevantUserName')); // Force wikitext/correct username
},
main: function( pageobj ) {
var text = pageobj.getPageText();
var statelem = pageobj.getStatusElement();
var params = pageobj.getCallbackParameters();
var messageData = params.messageData;
 
var history_re = /<!--\s? Template:([uU]wuw-.*?)\s? -->.*?(\d{1,2}:\d{1,2}, \d{1,2} \w+ \d{4}) \(UTC\))/g;
var history = {};
var latest = { date: new Morebits.dateDate( 0 ), type: '' };
var current;
 
while ( ( current = history_re.exec( text) ) !==) null) {
var template = current[1], current_date = new Morebits.dateDate( current[2] + ' UTC' );
if ( !(template current[1] in history ) || history[template current[1].isBefore( ] < current_date) ) {
history[template current[1] ] = current_date;
}
if( (current_date.getTime() >= latest.date.getTime() ) {
latest.date = current_date;
latest.type = templatecurrent[1];
}
}
 
var nowdate = new Morebits.date(pageobj.getLoadTimeDate());
 
if ( params.sub_group in history ) {
ifvar temp_time = (new Morebits.dateDate( history[ params.sub_group ]).add(1, 'day').isAfter(now)) {;
temp_time.setUTCHours( temp_time.getUTCHours() + 24 );
if (!confirm('An identical ' + params.sub_group + ' has been issued in the last 24 hours. \nWould you still like to add this warning/notice?')) {
 
statelem.error('aborted per user request');
if( temp_time > date ) {
if( !confirm( "An identical " + params.sub_group + " son 24 saat içinde yayınlandı. \nBu uyarıyı/bildirimi yine de göndermek istiyor musunuz?" ) ) {
pageobj.statelem.info( 'aborted per user request' );
return;
}
Satır 1.403 ⟶ 1.451:
}
 
latest.date.addsetUTCMinutes( latest.date.getUTCMinutes() + 1, 'minute'); // after long debate, one minute is max
 
if ( latest.date.isAfter(now) > date ) {
if ( !confirm(' "A '" + latest.type + '" hasson beendakikada issued in the last minuteyayınlandı. \nWouldnBu youuyarıyı/bildirimi stillyine likede togöndermek addistiyor this warning/noticemusunuz?'" ) ) {
pageobj.statelem.errorinfo( 'aborted per user request' );
return;
}
}
 
var dateHeaderRegex = nownew RegExp( "^==+\\s*(?:" + date.monthHeaderRegexgetUTCMonthName(), dateHeaderRegexLast,+ '|' + date.getUTCMonthNameAbbrev() dateHeaderRegexResult;+
")\\s+" + date.getUTCFullYear() + "\\s*==+", 'mg' );
while ((dateHeaderRegexLast = dateHeaderRegex.exec(text)) !== null) {
var dateHeaderRegexLast, dateHeaderRegexResult;
while ((dateHeaderRegexLast = dateHeaderRegex.exec( text )) !== null) {
dateHeaderRegexResult = dateHeaderRegexLast;
}
Satır 1.419 ⟶ 1.469:
// \n== is not found, then the date header must be at the very start of the page. lastIndexOf
// returns -1 in this case, so lastHeaderIndex gets set to 0 as desired.
var lastHeaderIndex = text.lastIndexOf(' "\n=='" ) + 1;
 
if ( text.length > 0 ) {
text += '"\n\n'";
}
 
if (messageData params.headingmain_group === 'block' ) {
if( Twinkle.getPref('blankTalkpageOnIndefBlock') && params.sub_group !== 'uw-lblock' && ( messageData.indefinite || (/indef|\*|max/).exec( params.block_timer ) ) ) {
text += '== ' + messageData.heading + ' ==\n';
Morebits.status.info( 'Info', 'Blanking talk page per preferences and creating a new level 2 heading for the date' );
} else if (!dateHeaderRegexResult || dateHeaderRegexResult.index !== lastHeaderIndex) {
text = "== " + date.getUTCMonthName() + " " + date.getUTCFullYear() + " ==\n";
Morebits.status.info('Info', 'Will create a new level 2 heading for the date, as none was found for this month');
} else if( !dateHeaderRegexResult || dateHeaderRegexResult.index !== lastHeaderIndex ) {
text += now.monthHeader() + '\n';
Morebits.status.info( 'Info', 'Will create a new level 2 heading for the date, as none was found for this month' );
text += "== " + date.getUTCMonthName() + " " + date.getUTCFullYear() + " ==\n";
}
 
text += Twinkle.warn.callbacks.getBlockNoticeWikitext(params.sub_group, params.article, params.block_timer, params.reason, messageData.indefinite);
} else {
if( messageData.heading ) {
text += "== " + messageData.heading + " ==\n";
} else if( !dateHeaderRegexResult || dateHeaderRegexResult.index !== lastHeaderIndex ) {
Morebits.status.info( 'Info', 'Will create a new level 2 heading for the date, as none was found for this month' );
text += "== " + date.getUTCMonthName() + " " + date.getUTCFullYear() + " ==\n";
}
text += Twinkle.warn.callbacks.getWarningWikitext(params.sub_group, params.article,
params.reason, params.main_group === 'custom') + "--~~~~";
}
text += Twinkle.warn.callbacks.getWarningWikitext(params.sub_group, params.article,
params.reason, params.main_group === 'custom');
 
if ( Twinkle.getPref('showSharedIPNotice') && mw.utilMorebits.isIPAddress( mw.config.get('wgTitle') ) ) {
Morebits.status.info( 'Info', 'Adding a shared IP notice' );
text += ' "\n{{subst:SharedPaylaşılan IP adviceTavsiyesi}}'";
}
 
// build the edit summary
var summary;
if ( params.main_group === 'custom' ) {
switch ( params.sub_group.substr( -1 ) ) {
case '"1'":
summary = '"General note'";
break;
case '"2'":
summary = '"Caution'";
break;
case '"3'":
summary = '"Warning'";
break;
case '"4'":
summary = '"Final warning'";
break;
case '"m'":
if ( params.sub_group.substr( -3 ) === '"4im'" ) {
summary = '"Only warning'";
break;
}
summary = '"Notice'";
break;
default:
summary = '"Notice'";
break;
}
summary += '": '" + Morebits.string.toUpperCaseFirstChar(messageData.label);
} else {
summary = messageData.summary;
// Normalize kitchensink to the 1-4im style
if (params messageData.main_groupsuppressArticleInSummary =!== 'kitchensink'true && !/^D+$/.test(params.sub_group)article ) {
varif sub =( params.sub_group.substr( === "uw-1socksuspect" ); { // this template requires a username
summary += " of [[User:" + params.article + "]]";
if (sub === 'm') {
sub = params.sub_group.substr(-3);
}
// Don't overwrite uw-3rr, technically unnecessary
if (/\d/.test(sub)) {
params.main_group = 'level' + sub;
}
}
summary = /^\D+$/.test(params.main_group) ? messageData.summary : messageData[params.main_group].summary;
if (messageData.suppressArticleInSummary !== true && params.article) {
if (params.sub_group === 'uw-agf-sock' ||
params.sub_group === 'uw-socksuspect' ||
params.sub_group === 'uw-aiv') { // these templates require a username
summary += ' of [[:User:' + params.article + ']]';
} else {
summary += ' on" ([[:'" + params.article + '"]]' sayfası)";
}
}
}
summary += '".'" + Twinkle.getPref('"summaryAd'");
 
pageobj.setPageText( text );
pageobj.setEditSummary( summary );
pageobj.setWatchlist( Twinkle.getPref('watchWarnings') );
pageobj.save();
}
Satır 1.500 ⟶ 1.549:
 
Twinkle.warn.callback.evaluate = function twinklewarnCallbackEvaluate(e) {
var userTalkPage = 'User_talk:' + mw.config.get('wgRelevantUserName');
 
// First, check to make sure a reason was filled in if uw-username was selected
 
if (e.target.sub_group.value === 'uw-username' && e.target.article.value.trim() === '') {
alert('"You must supply a reason for the {{uw-username}} template.'");
return;
}
Satır 1.514 ⟶ 1.562:
// Then, grab all the values provided by the form
var params = {
reason: e.target.block_reason ? e.target.block_reason.value : e.target.reason.value,
main_group: e.target.main_group.value,
sub_group: e.target.sub_group.value,
article: e.target.article.value, // .replace( /^(Image|Category):/i, ':$1:' ), -- apparently no longer needed...
block_timer: e.target.block_timer ? e.target.block_timer.value : null,
messageData: selectedEl.data('messageData')
messageData: selectedEl.data("messageData")
};
 
Morebits.simpleWindow.setButtonsEnabled( false );
Morebits.status.init( e.target );
 
Morebits.wiki.actionCompleted.redirect = mw.config.get('wgPageName');
Morebits.wiki.actionCompleted.notice = 'Warning"Uyarma completetamamlandı, reloadingmesaj talksayfası pagebirkaç insaniye aiçerisinde few seconds'yenilenecek";
 
var wikipedia_page = new Morebits.wiki.page( mw.config.get('wgPageName'), 'User talk page modification' );
wikipedia_page.setCallbackParameters( params );
wikipedia_page.setFollowRedirect( true );
wikipedia_page.load( Twinkle.warn.callbacks.main );
};
})(jQuery);
 
 
// </nowiki>