"सदस्य:SM7/closeAFD.js" के अवतरणों में अंतर

2,595 बैट्स् जोड़े गए ,  1 माह पहले
temporary activation of XFD.js
(केवल लेख की चर्चा हेतु)
(temporary activation of XFD.js)
// See [[:en:User:Mr.Z-man/closeAFD]] for documentation
// Original script by -[[:en:User:Mr.Z-man]]
// Adapted and localised by - [[User:Shubhamkanodia]]
// Disabled Ajax test script - [[User:SM7]]
/*
The MIT License (MIT)
*/
mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Timotheus_Canens/displaymessage.js&action=raw&ctype=text/javascript');
if (wgPageName.indexOf('विकिपीडिया:पृष्ठ_हटाने_हेतु_चर्चा/लेख/') != -1) { //This is to make sure this tool becomes active only on Afd pages
var closeAFD_PageNamecloseXFD_PageName = wgPageName.replace(/_/g, ' ');
var closeAFD_isAdmincloseXFD_isAdmin = (wgUserGroups.toString().indexOf('sysop') != -1);
var closeAFD_AJAXnumbercloseXFD_AJAXnumber = 0;
var closeAFD_deletenredirectcloseXFD_deletenredirect = false;
var closeAFD_nomdatecloseXFD_nomdate = null;
var closeXFD_deletecount = 0;
var closeXFD_redirectlimit;
var closeXFD_redirtotal;
var closeAFD_redircountcloseXFD_redircount = 0;
 
function closeAFD_initcloseXFD_init() {
// This loads tool name in "अधिक" tab when everything is ready
mw.loader.using(['mediawiki.util']).done(function () {
mw.util.addPortletLink( 'p-cactions', 'javascript:closeAFD_init()', 'हहेच समापन', 'ca-closeAFD', 'हटाने हेतु चर्चायें समाप्त करने का औजार' );
});
// Here we define some variables
var closeAFD_PageName = wgPageName.replace(/_/g, ' ');
var closeAFD_isAdmin = (wgUserGroups.toString().indexOf('sysop') != -1);
var closeAFD_AJAXnumber = 0;
var closeAFD_deletenredirect = false;
var closeAFD_nomdate = null;
var closeAFD_deletecount = 0;
var closeAFD_redirectlimit;
var closeAFD_redirtotal;
var closeAFD_redircount = 0;
 
function closeAFD_init() {
var temptitle = wgTitle.substring(wgTitle.indexOf('/') + 1);
pagetitle = temptitle.substring(temptitle.indexOf('/') + 1);
}
 
form = '<div id="closeAFD_initialformcloseXFD_initialform">' +
'<h3>' + closeAFD_PageNamecloseXFD_PageName + 'को समाप्त किया जा रहा है </h3>' +
'<label for="closeAFD_reasoncloseXFD_reason">अतिरिक्त समापन औचित्य (वैकल्पिक):</label><br />' +
'<input type="text" size="120" id="closeAFD_reasoncloseXFD_reason" name="closeAFD_reasoncloseXFD_reason" />' +
'<input type="button" id="closeAFD_delete_buttoncloseXFD_delete_button" name="closeAFD_delete_buttoncloseXFD_delete_button" value="हटाया" onclick="closeAFD_closecloseXFD_close(\'हटाया\')" />' +
'<input type="button" id="closeAFD_keep_buttoncloseXFD_keep_button" name="closeAFD_keep_buttoncloseXFD_keep_button" value="रखा" onclick="closeAFD_closecloseXFD_close(\'रखा\')" />' +
'<input type="button" id="closeAFD_redirect_buttoncloseXFD_redirect_button" name="closeAFD_redirect_buttoncloseXFD_redirect_button" value="पुनर्निर्देशित" onclick="closeAFD_promptcloseXFD_prompt(\'पुनर्निर्देशित\')" />' +
'<input type="button" id="closeAFD_merge_buttoncloseXFD_merge_button" name="closeAFD_merge_buttoncloseXFD_merge_button" value="विलय" onclick="closeAFD_promptcloseXFD_prompt(\'विलय\')" />' +
'<input type="button" id="closeAFD_other_buttoncloseXFD_other_button" name="closeAFD_other_buttoncloseXFD_other_button" value="अन्य" onclick="closeAFD_othercloseXFD_other()" /><br />' +
'<label for="closeAFD_deleteredircloseXFD_deleteredir">इस पृष्ठ पर अनुप्रेषित हो रहे पन्नें हटाएँ:</label><input type="checkbox" id="closeAFD_deleteredircloseXFD_deleteredir" name="closeAFD_deleteredircloseXFD_deleteredir" />' +
'<input type="hidden" value="0" id="closeAFD_dodeletecloseXFD_dodelete" name="closeAFD_dodeletecloseXFD_dodelete" /></div><div id="closeAFD_extracloseXFD_extra"></div>';
displayMessage(form);
if (!closeAFD_isAdmincloseXFD_isAdmin) {
document.getElementById('closeAFD_delete_buttoncloseXFD_delete_button').disabled = true;
document.getElementById('closeAFD_deleteredircloseXFD_deleteredir').disabled = true;
}
}
 
function closeAFD_promptcloseXFD_prompt(type) {
document.getElementById('closeAFD_extracloseXFD_extra').innerHTML += '<br /><label for="closeAFD_promptcloseXFD_prompt">यहाँ ' + type + ' करें: </label><input type="text" id="closeAFD_promptcloseXFD_prompt" name="closeAFD_promptcloseXFD_prompt" /><br />';
if (type == 'पुनर्निर्देशित') {
document.getElementById('closeAFD_extracloseXFD_extra').innerHTML += '<label for="closeAFD_delete_firstcloseXFD_delete_first">पुनर्निर्देशित करने से पहले हटाएँ: </label><input type="checkbox" id="closeAFD_delete_firstcloseXFD_delete_first" name="closeAFD_delete_firstcloseXFD_delete_first" />';
}
document.getElementById('closeAFD_extracloseXFD_extra').innerHTML += '<input type="button" id="closeAFD_prompt_buttoncloseXFD_prompt_button" name="closeAFD_prompt_buttoncloseXFD_prompt_button" value="जमा करें" onclick="closeAFD_closecloseXFD_close(\'' + type + '\')" />';
if (!closeAFD_isAdmincloseXFD_isAdmin && type == 'पुनर्निर्देशित') {
document.getElementById('closeAFD_delete_firstcloseXFD_delete_first').disabled = true;
}
}
 
function closeAFD_othercloseXFD_other() {
document.getElementById('closeAFD_extracloseXFD_extra').innerHTML += '<br /><br /><label for="closeAFD_otherclosecloseXFD_otherclose">अन्य: </label><input type="text" id="closeAFD_otherclosecloseXFD_otherclose" name="closeAFD_otherclosecloseXFD_otherclose" />' +
'<input type="button" id="closeAFD_other_delete_buttoncloseXFD_other_delete_button" name="closeAFD_other_delete_buttoncloseXFD_other_delete_button" value="लेख हटाएँ" onclick="closeAFD_otherdeletecloseXFD_otherdelete()" />' +
'<input type="button" id="closeAFD_other_nodelete_buttoncloseXFD_other_nodelete_button" name="closeAFD_other_nodelete_buttoncloseXFD_other_nodelete_button" value="न हटाएँ" onclick="closeAFD_otherkeepcloseXFD_otherkeep()" />';
if (!closeAFD_isAdmincloseXFD_isAdmin) {
document.getElementById('closeAFD_other_delete_buttoncloseXFD_other_delete_button').disabled = true;
}
}
 
function closeAFD_otherdeletecloseXFD_otherdelete() {
document.getElementById('closeAFD_dodeletecloseXFD_dodelete').value = 1;
close = document.getElementById('closeAFD_otherclosecloseXFD_otherclose').value;
closeAFD_closecloseXFD_close(close);
}
 
function closeAFD_otherkeepcloseXFD_otherkeep() {
close = document.getElementById('closeAFD_otherclosecloseXFD_otherclose').value;
closeAFD_closecloseXFD_close(close);
}
 
function closeAFD_closecloseXFD_close(close) {
if (typeof (closeAFD_redirectlimitcloseXFD_redirectlimit) == "undefined") {
closeAFD_redirectlimitcloseXFD_redirectlimit = 50;
}
deleteredirects = false;
if (document.getElementById('closeAFD_deleteredircloseXFD_deleteredir').checked) {
deleteredirects = true;
}
closetype = close;
var dodelete = false;
if (closetype == "हटाया" || document.getElementById('closeAFD_dodeletecloseXFD_dodelete').value == 1) {
dodelete = true;
}
var reason = document.getElementById('closeAFD_reasoncloseXFD_reason').value;
if (reason != '') {
reason = ' ' + reason;
}
if (closetype == "पुनर्निर्देशित" || closetype == "विलय") {
var target = document.getElementById('closeAFD_promptcloseXFD_prompt').value;
if (target == null || target == '') {
displayMessage('<div style="color:red; font-size:120%">' + closetype + ' के लिए लक्ष्य नहीं दिया गया।</div>')
close += " [[" + target + "]] पर ";
}
if (closetype == "पुनर्निर्देशित" && document.getElementById('closeAFD_delete_firstcloseXFD_delete_first').checked == true) {
dodelete = true;
closeAFD_deletenredirectcloseXFD_deletenredirect = target;
}
displayMessage('<ul id="closeAFD_statuscloseXFD_status"></ul><ul id="closeAFD_finishcloseXFD_finish"></ul>');
document.getElementById('closeAFD_finishcloseXFD_finish').innerHTML += '<span id="closeAFD_finished_wrappercloseXFD_finished_wrapper"><span id="closeAFD_finished_maincloseXFD_finished_main" style="display:none"><li id="closeAFD_donecloseXFD_done"><b>पूर्ण हुआ (<a href="/wiki/' + encodeURI(closeAFD_PageNamecloseXFD_PageName) + '?action=purge" title="' + closeAFD_PageNamecloseXFD_PageName + '">पृष्ठ पुनः लोड करें</a>)</b></li></span></span>';
var AFDpage = closeAFD_getPageTextcloseXFD_getPageText(closeAFD_PageNamecloseXFD_PageName);
closeAFD_nomdatecloseXFD_nomdate = /\d{1,2} \D{4,9} \d{4} \(UTC\)/.exec(AFDpage);
AFDpage = AFDpage.replace(/{\{हहेच श्रेणीकरण\|वर्तमान=हाँ\|प्रकार=/, "{{हहेच श्रेणीकरण|वर्तमान=नहीं|प्रकार=");
if (closeAFD_isAdmincloseXFD_isAdmin) {
AFDpage = "{" + "{subst:हहेच शुरू|'''" + close + "''' " + reason + "}}" + "~~" + '~~\n' + AFDpage + '\n{' + '{subst:हहेच अंत}}';
} else {
AFDpage = "{" + "{subst:हहेच शुरू|'''" + close + "''' " + reason + " (non-admin closure)}}" + "~~" + '~~\n' + AFDpage + '\n{' + '{subst:हहेच अंत}}';
}
token = closeAFD_getTokencloseXFD_getToken(true);
var temptitle = wgTitle.substring(wgTitle.indexOf('/') + 1);
pagetitle = temptitle.substring(temptitle.indexOf('/') + 1);
//Here we need it to get which namespace its
closeAFD_editPage(closeAFD_PageName, AFDpage, token, "चर्चा समाप्त की, परिणाम था:" + close);
if (wgPageName.indexOf('विकिपीडिया:पृष्ठ_हटाने_हेतु_चर्चा/साँचे/') != -1) {
var AFDlink = '[[' + closeAFD_PageName + ']]';
pagetitlefull = "साँचा:"+pagetitle;
} else if (wgPageName.indexOf('विकिपीडिया:पृष्ठ_हटाने_हेतु_चर्चा/श्रेणियाँ/') != -1) {
pagetitlefull = "श्रेणी:"+pagetitle;
} else {
pagetitlefull = pagetitle;
}
closeAFD_editPagecloseXFD_editPage(closeAFD_PageNamecloseXFD_PageName, AFDpage, token, "चर्चा समाप्त की, परिणाम था:" + close);
var AFDlink = '[[' + closeAFD_PageNamecloseXFD_PageName + ']]';
if (dodelete) {
if (deleteredirects) {
redirects = closeAFD_getRedirectscloseXFD_getRedirects(pagetitlepagetitlefull);
if (redirects == "toomanyredir") {
document.getElementById('closeAFD_statuscloseXFD_status').innerHTML += '<li>अनुप्रेषित पन्नों की संख्या ' + closeAFD_redirectlimitcloseXFD_redirectlimit + 'की सीमा से अधिक है</li>';
} else if (redirects == "noredir") {
document.getElementById('closeAFD_statuscloseXFD_status').innerHTML += '<li>अनुप्रेषित पन्नें नहीं हैं</li>';
} else {
closeAFD_deleteRedirectscloseXFD_deleteRedirects(pagetitlepagetitlefull, redirects, token);
}
}
closeAFD_deletePagecloseXFD_deletePage(pagetitlepagetitlefull, encodeURIComponent(token), AFDlink, false, false);
//Here too in order to append namespace to talkpage *****************************
closeAFD_deletePage("वार्ता:" + pagetitle, encodeURIComponent(token), AFDlink, false, false);
if (wgPageName.indexOf('विकिपीडिया:पृष्ठ_हटाने_हेतु_चर्चा/साँचे/') != -1) {
closeXFD_deletePage("साँचा वार्ता:" + pagetitle, encodeURIComponent(token), AFDlink, false, false);
} else if (wgPageName.indexOf('विकिपीडिया:पृष्ठ_हटाने_हेतु_चर्चा/श्रेणियाँ/') != -1) {
closeXFD_deletePage("श्रेणी वार्ता:" + pagetitle, encodeURIComponent(token), AFDlink, false, false);
} else {
closeAFD_deletePage closeXFD_deletePage("वार्ता:" + pagetitle, encodeURIComponent(token), AFDlink, false, false);
}
}
var articlepage = ''
if (closetype != "पुनर्निर्देशित" && closetype != "हटाया" && !dodelete) {
articlepage = closeAFD_getPageTextcloseXFD_getPageText(pagetitlepagetitlefull);
// Here is real crap it misbehaves while removing nomination from Templates *******
articlepage = articlepage.replace(/{\{हहेच.*|कारण=.*\}\}\n*/, '');
if (wgPageName.indexOf('विकिपीडिया:पृष्ठ_हटाने_हेतु_चर्चा/साँचे/') != -1) {
articlepage = articlepage.replace(/{\{हहेच.*|कारण=.*\}\} \n*/, '');
articlepage = articlepage.replace(/noinclude/, '');
articlepage = articlepage.replace(/<>/, '');
articlepage = articlepage.replace(/\n*/, '');
} else {
articlepage = articlepage.replace(/{\{हहेच.*|कारण=.*\}\}\n*/, '');
}
 
}
if (closetype == "पुनर्निर्देशित") {
if (wgPageName.indexOf('विकिपीडिया:पृष्ठ_हटाने_हेतु_चर्चा/श्रेणियाँ/') != -1) {
articlepage = "#अनुप्रेषित [[" + target + "]]";
articlepage="{{श्रेणी अनुप्रेषित|" + target + "}}";
} else {
articlepage = "#अनुप्रेषित [[" + target + "]]";
}
}
if (!dodelete) {
if (closeAFD_nomdatecloseXFD_nomdate == null) {
closeAFD_nomdatecloseXFD_nomdate = prompt("नामांकन की तारीख?", '');
}
var talkpage = '';
if (closetype != "पुनर्निर्देशित") {
talkpage = closeAFD_getPageTextcloseXFD_getPageText("वार्ता:" + pagetitle);
talkpage = "{" + "{Old AfD multi| date = " + closeAFD_nomdatecloseXFD_nomdate + " | result = '''" + close + "''' | page = " + pagetitlepagetitlefull + " }}\n\n" + talkpage;
} else {
talkpage = "{" + "{Old AfD multi| date = " + closeAFD_nomdatecloseXFD_nomdate + " | result = '''" + close + "''' | page = " + pagetitlepagetitlefull + " }}";
}
if (closetype == "विलय") {
datestring = day + " " + month + " " + year;
articlepage = "{" + "{afd-mergeto|" + target + "|" + debatename + "|" + datestring + "}}\n\n" + articlepage;
var targettalkpage = closeAFD_getPageTextcloseXFD_getPageText("वार्ता:" + target);
targettalkpage = "{" + "{afd-mergefrom|" + pagetitlepagetitlefull + "|" + debatename + "|" + datestring + "}}\n\n" + targettalkpage;
closeAFD_editPagecloseXFD_editPage("Talk:" + target, targettalkpage, token, AFDlink + close + " कर समाप्त किया");
}
closeAFD_editPagecloseXFD_editPage(pagetitlepagetitlefull, articlepage, token, AFDlink + " समाप्त की। परिणाम: " + close);
// Here same thing, get correct talkpage *******************
closeAFD_editPage("वार्ता:" + pagetitle, talkpage, token, AFDlink + " समाप्त की। परिणाम: " + close);
if (wgPageName.indexOf('विकिपीडिया:पृष्ठ_हटाने_हेतु_चर्चा/साँचे/') != -1) {
closeXFD_editPage("साँचा वार्ता:" + pagetitle, talkpage, token, AFDlink + " समाप्त की गयी। परिणाम: " + close);
} else if (wgPageName.indexOf('विकिपीडिया:पृष्ठ_हटाने_हेतु_चर्चा/श्रेणियाँ/') != -1) {
closeXFD_editPage("श्रेणी वार्ता:" + pagetitle, talkpage, token, AFDlink + " समाप्त की गयी। परिणाम: " + close);
} else {
closeAFD_editPage closeXFD_editPage("वार्ता:" + pagetitle, talkpage, token, AFDlink + " समाप्त की।की गयी। परिणाम: " + close);
}
 
}
document.getElementById('closeAFD_finished_maincloseXFD_finished_main').style.display = '';
}
 
function closeAFD_getPageTextcloseXFD_getPageText(title) {
document.getElementById('closeAFD_statuscloseXFD_status').innerHTML += '<li id="closeAFD_getcloseXFD_get' + escape(title) + '"><a href="/wiki/' + encodeURI(title) + '" title="' + title + '">' + title + '</a>प्राप्त किया जा रहा है</li>';
var req = new XMLHttpRequest();
req.open("GET", wgScriptPath + "/api.php?action=query&prop=revisions&rvprop=content&format=json&indexpageids=1&titles=" + encodeURIComponent(title), false);
pageid = response['query']['pageids'][0];
if (pageid == "-1") {
document.getElementById('closeAFD_getcloseXFD_get' + escape(title)).innerHTML = '<a class="new" href="/wiki/' + encodeURI(title) + '" title="' + title + '">' + title + '</a> मौजूद नहीं है';
delete req;
return '';
pagetext = response['query']['pages'][pageid]['revisions'][0]['*'];
delete req;
document.getElementById('closeAFD_getcloseXFD_get' + escape(title)).innerHTML = '<a href="/wiki/' + encodeURI(title) + '" title="' + title + '">' + title + '</a> प्राप्त किया जा रहा है';
return pagetext;
}
 
function closeAFD_getTokencloseXFD_getToken(show) {
if (show) {
document.getElementById('closeAFD_statuscloseXFD_status').innerHTML += '<li id="closeAFD_gettokencloseXFD_gettoken">टोकन प्राप्त किया जा रहा है</li>';
}
var req = new XMLHttpRequest();
req.open("GET", wgScriptPath + "/api.php?action=query&prop=info&indexpageids=1&intoken=edit&format=json&titles=" + encodeURIComponent(closeAFD_PageNamecloseXFD_PageName), false);
req.send(null);
var response = eval('(' + req.responseText + ')');
delete req;
if (show) {
document.getElementById('closeAFD_gettokencloseXFD_gettoken').innerHTML = 'टोकन प्राप्त किया जा रहा है';
}
return token;
}
 
function closeAFD_getOldLogcloseXFD_getOldLog() {
var req = new XMLHttpRequest();
req.open("GET", wgScriptPath + "/api.php?action=query&format=json&list=embeddedin&eifilterredir=nonredirects&einamespace=4&bllimit=500&eititle=" + encodeURIComponent(closeAFD_PageNamecloseXFD_PageName), false);
req.send(null);
var response = eval('(' + req.responseText + ')');
}
 
function closeAFD_editPagecloseXFD_editPage(title, newtext, token, summary) {
document.getElementById('closeAFD_finished_wrappercloseXFD_finished_wrapper').innerHTML = '<span id="closeAFD_AJAX_finished_closeXFD_AJAX_finished_' + closeAFD_AJAXnumbercloseXFD_AJAXnumber + '" style="display:none">' + document.getElementById('closeAFD_finished_wrappercloseXFD_finished_wrapper').innerHTML + '</span>';
var func_id = closeAFD_AJAXnumbercloseXFD_AJAXnumber;
closeAFD_AJAXnumbercloseXFD_AJAXnumber++;
document.getElementById('closeAFD_statuscloseXFD_status').innerHTML += '<li id="closeAFD_editcloseXFD_edit' + escape(title) + '"><a href="/wiki/' + encodeURI(title) + '" title="' + title + '">' + title + '</a> में बदलाव किये जा रहे हैं</li>';
var req = new XMLHttpRequest();
var params = "action=edit&format=json&token=" + encodeURIComponent(token) + "&title=" + encodeURIComponent(title) + "&text=" + encodeURIComponent(newtext) + "&notminor=1&unwatch=1&summary=" + encodeURIComponent(summary);
try {
if (response['edit']['result'] == "Success") {
document.getElementById('closeAFD_editcloseXFD_edit' + escape(title)).innerHTML = '<a href="/wiki/' + encodeURI(title) + '" title="' + title + '">' + title + '</a> को सहेजा';
} else {
document.getElementById('closeAFD_editcloseXFD_edit' + escape(title)).innerHTML = '<div style="color:red"><b><a href="/wiki/' + encodeURI(title) + '" title="' + title + '">' + title + '</a> पर संपादन असफल रहा</b></div>. Error info:' + response['error']['code'] + ' : ' + response['error']['info'];
}
} catch (err) {
document.getElementById('closeAFD_editcloseXFD_edit' + escape(title)).innerHTML = '<div style="color:red"><b><a href="/wiki/' + encodeURI(title) + '" title="' + title + '">' + title + '</a> पर संपादन असफल रहा</b></div>';
}
document.getElementById('closeAFD_AJAX_finished_closeXFD_AJAX_finished_' + func_id).style.display = '';
delete req;
}
}
 
function closeAFD_deletePagecloseXFD_deletePage(title, token, summary, isredirect, retry) {
document.getElementById('closeAFD_finished_wrappercloseXFD_finished_wrapper').innerHTML = '<span id="closeAFD_AJAX_finished_closeXFD_AJAX_finished_' + closeAFD_AJAXnumbercloseXFD_AJAXnumber + '" style="display:none">' + document.getElementById('closeAFD_finished_wrappercloseXFD_finished_wrapper').innerHTML + '</span>';
var func_id = closeAFD_AJAXnumbercloseXFD_AJAXnumber;
closeAFD_AJAXnumbercloseXFD_AJAXnumber++;
if (!isredirect && !retry) {
document.getElementById('closeAFD_statuscloseXFD_status').innerHTML += '<li id="closeAFD_deletecloseXFD_delete' + escape(title) + '"><a href="/wiki/' + encodeURI(title) + '" title="' + title + '">' + title + '</a> को हटाया जा रहा है</li>';
} else if (!retry) {
closeAFD_redircountcloseXFD_redircount++;
thisredir = closeAFD_redircountcloseXFD_redircount
document.getElementById('redirstart').style.display = '';
document.getElementById('redirstart').innerHTML = closeAFD_redirtotalcloseXFD_redirtotal + 'में से' + closeAFD_redircountcloseXFD_redircount + "अनुप्रेषित पन्ने को हटाया जा रहा है";
}
var req = new XMLHttpRequest();
if (response['delete']['title']) {
if (!isredirect) {
document.getElementById('closeAFD_deletecloseXFD_delete' + escape(title)).innerHTML = '<a class="new" href="/wiki/' + encodeURI(title) + '" title="' + title + '">' + title + '</a> को हटाया';
} else {
document.getElementById('redirend').style.display = '';
document.getElementById('redirend').innerHTML = closeAFD_redirtotalcloseXFD_redirtotal + ' में से' + thisredir + " अनुप्रेषित पन्ने को हटाया जा रहा है";
}
}
} catch (err) {
if (response['error']['code'] == "missingtitle") {
document.getElementById('closeAFD_deletecloseXFD_delete' + escape(title)).innerHTML = '<a class="new" href="/wiki/' + encodeURI(title) + '" title="' + title + '">' + title + '</a> मौजूद नहीं है';
} else if (!isredirect) {
if (retry) {
document.getElementById('closeAFD_deletecloseXFD_delete' + escape(title)).innerHTML = '<span style="color:red"><b>Deletion error on <a href="/wiki/' + encodeURI(title) + '" title="' + title + '">' + title + '</a>. Error info:' + response['error']['code'] + ' : ' + response['error']['info'] + '</b></span>';
} else {
closeAFD_deletePagecloseXFD_deletePage(title, token, summary, false, true);
}
} else {
if (retry) {
document.getElementById('closeAFD_statuscloseXFD_status').innerHTML += '<li><span style="color:red"><b>Deletion error on <a href="/wiki/' + encodeURI(title) + '" title="' + title + '">' + title + '</a>. Error info:' + response['error']['code'] + ' : ' + response['error']['info'] + '</b></span></li>';
} else {
closeAFD_deletePagecloseXFD_deletePage(title, token, summary, true, true);
}
}
}
document.getElementById('closeAFD_AJAX_finished_closeXFD_AJAX_finished_' + func_id).style.display = '';
delete req;
if (!isredirect) {
closeAFD_deletecountcloseXFD_deletecount++;
}
if (closeAFD_deletenredirectcloseXFD_deletenredirect && closeAFD_deletecountcloseXFD_deletecount == 2) {
articletext = '';
articletext = "#अनुप्रेषित [[" + closeAFD_deletenredirectcloseXFD_deletenredirect + "]]";
var AFDlink = '[[' + closeAFD_PageNamecloseXFD_PageName + ']]';
token = closeAFD_getTokencloseXFD_getToken(false);
closeAFD_editPagecloseXFD_editPage(title, articletext, token, AFDlink + "[[" + closeAFD_deletenredirectcloseXFD_deletenredirect + "]] पर अनुप्रेषित कर समाप्त किया।")
}
}
}
 
function closeAFD_getRedirectscloseXFD_getRedirects(page) {
document.getElementById('closeAFD_statuscloseXFD_status').innerHTML += '<li id="closeAFD_getredircloseXFD_getredir">पृष्ठ पर अनुप्रेषित हो रहे पन्ने प्राप्त किये जा रहे हैं</li>';
var url = wgScriptPath + "/api.php?action=query&format=json&action=query&list=backlinks&bltitle=" + encodeURIComponent(page) + "&blfilterredir=redirects&bllimit=" + closeAFD_redirectlimitcloseXFD_redirectlimit
var req = new XMLHttpRequest();
req.open("GET", url, false);
}
delete req;
document.getElementById('closeAFD_getredircloseXFD_getredir').innerHTML = redirects.length + ' पुनर्निर्देशित पृष्ठ प्राप्त किये';
closeAFD_redirtotalcloseXFD_redirtotal = redirects.length;
return redirects;
}
 
function closeAFD_deleteRedirectscloseXFD_deleteRedirects(pagetitle, redirects, token) {
summary = "[[" + closeAFD_PageNamecloseXFD_PageName + "]] के बाद \"" + pagetitlepagetitlefull + "\"पर अनुप्रेषित पन्नों को हटाया जा रहा है";
document.getElementById('closeAFD_statuscloseXFD_status').innerHTML += '<li id="redirstart" style="display:none;"></li><li id="redirend" style="display:none;"></li>';
for (var i = 0; i < closeAFD_redirtotalcloseXFD_redirtotal; i++) {
setTimeout("closeAFD_deletePagecloseXFD_deletePage('" + redirects[i].replace(/'/, "\'") /*'*/ + "', '" + encodeURIComponent(token) + "', '" + summary + "', true, false)", 500 * closeAFD_redircountcloseXFD_redircount);
}
}
 
function closeXFD_addLink() {
mw.util. addPortletLink( '"p-cactions'", '"javascript:closeAFD_initcloseXFD_init()'", '"अन्य हहेच समापन'", '"ca-closeAFD'closeXFD", 'हटाने" हेतुअन्य चर्चायेंहहेच समाप्तको करने काहेतु औजार' ");
}
 
jQuery(document).ready(closeXFD_addLink);
}