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

2,595 बैट्स् नीकाले गए ,  5 माह पहले
restored back / the copy of XFD saved by this diff here
(temporary activation of XFD.js)
(restored back / the copy of XFD saved by this diff here)
टैग: Manual revert
 
// 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 closeXFD_PageName = wgPageName.replace(/_/g, ' ');
var closeXFD_isAdmin = (wgUserGroups.toString().indexOf('sysop') != -1);
var closeXFD_AJAXnumber = 0;
var closeXFD_deletenredirect = false;
var closeXFD_nomdate = null;
var closeXFD_deletecount = 0;
var closeXFD_redirectlimit;
var closeXFD_redirtotal;
var closeXFD_redircount = 0;
 
// This loads tool name in "अधिक" tab when everything is ready
function closeXFD_init() {
mw.loader.using(['mediawiki.util']).done(function () {
mw.util.addPortletLink(" 'p-cactions"', "'javascript:closeXFD_initcloseAFD_init()"', "अन्य 'हहेच समापन"', "'ca-closeXFD"closeAFD', "'हटाने अन्यहेतु हहेचचर्चायें कोसमाप्त करने हेतुका औजार"' );
});
// Here we define some variables
var closeXFD_PageNamecloseAFD_PageName = wgPageName.replace(/_/g, ' ');
var closeXFD_isAdmincloseAFD_isAdmin = (wgUserGroups.toString().indexOf('sysop') != -1);
var closeXFD_AJAXnumbercloseAFD_AJAXnumber = 0;
var closeXFD_deletenredirectcloseAFD_deletenredirect = false;
var closeXFD_nomdatecloseAFD_nomdate = null;
var closeAFD_deletecount = 0;
var closeAFD_redirectlimit;
var closeAFD_redirtotal;
var closeXFD_redircountcloseAFD_redircount = 0;
 
function closeXFD_initcloseAFD_init() {
var temptitle = wgTitle.substring(wgTitle.indexOf('/') + 1);
pagetitle = temptitle.substring(temptitle.indexOf('/') + 1);
}
 
form = '<div id="closeXFD_initialformcloseAFD_initialform">' +
'<h3>' + closeXFD_PageNamecloseAFD_PageName + 'को समाप्त किया जा रहा है </h3>' +
'<label for="closeXFD_reasoncloseAFD_reason">अतिरिक्त समापन औचित्य (वैकल्पिक):</label><br />' +
'<input type="text" size="120" id="closeXFD_reasoncloseAFD_reason" name="closeXFD_reasoncloseAFD_reason" />' +
'<input type="button" id="closeXFD_delete_buttoncloseAFD_delete_button" name="closeXFD_delete_buttoncloseAFD_delete_button" value="हटाया" onclick="closeXFD_closecloseAFD_close(\'हटाया\')" />' +
'<input type="button" id="closeXFD_keep_buttoncloseAFD_keep_button" name="closeXFD_keep_buttoncloseAFD_keep_button" value="रखा" onclick="closeXFD_closecloseAFD_close(\'रखा\')" />' +
'<input type="button" id="closeXFD_redirect_buttoncloseAFD_redirect_button" name="closeXFD_redirect_buttoncloseAFD_redirect_button" value="पुनर्निर्देशित" onclick="closeXFD_promptcloseAFD_prompt(\'पुनर्निर्देशित\')" />' +
'<input type="button" id="closeXFD_merge_buttoncloseAFD_merge_button" name="closeXFD_merge_buttoncloseAFD_merge_button" value="विलय" onclick="closeXFD_promptcloseAFD_prompt(\'विलय\')" />' +
'<input type="button" id="closeXFD_other_buttoncloseAFD_other_button" name="closeXFD_other_buttoncloseAFD_other_button" value="अन्य" onclick="closeXFD_othercloseAFD_other()" /><br />' +
'<label for="closeXFD_deleteredircloseAFD_deleteredir">इस पृष्ठ पर अनुप्रेषित हो रहे पन्नें हटाएँ:</label><input type="checkbox" id="closeXFD_deleteredircloseAFD_deleteredir" name="closeXFD_deleteredircloseAFD_deleteredir" />' +
'<input type="hidden" value="0" id="closeXFD_dodeletecloseAFD_dodelete" name="closeXFD_dodeletecloseAFD_dodelete" /></div><div id="closeXFD_extracloseAFD_extra"></div>';
displayMessage(form);
if (!closeXFD_isAdmincloseAFD_isAdmin) {
document.getElementById('closeXFD_delete_buttoncloseAFD_delete_button').disabled = true;
document.getElementById('closeXFD_deleteredircloseAFD_deleteredir').disabled = true;
}
}
 
function closeXFD_promptcloseAFD_prompt(type) {
document.getElementById('closeXFD_extracloseAFD_extra').innerHTML += '<br /><label for="closeXFD_promptcloseAFD_prompt">यहाँ ' + type + ' करें: </label><input type="text" id="closeXFD_promptcloseAFD_prompt" name="closeXFD_promptcloseAFD_prompt" /><br />';
if (type == 'पुनर्निर्देशित') {
document.getElementById('closeXFD_extracloseAFD_extra').innerHTML += '<label for="closeXFD_delete_firstcloseAFD_delete_first">पुनर्निर्देशित करने से पहले हटाएँ: </label><input type="checkbox" id="closeXFD_delete_firstcloseAFD_delete_first" name="closeXFD_delete_firstcloseAFD_delete_first" />';
}
document.getElementById('closeXFD_extracloseAFD_extra').innerHTML += '<input type="button" id="closeXFD_prompt_buttoncloseAFD_prompt_button" name="closeXFD_prompt_buttoncloseAFD_prompt_button" value="जमा करें" onclick="closeXFD_closecloseAFD_close(\'' + type + '\')" />';
if (!closeXFD_isAdmincloseAFD_isAdmin && type == 'पुनर्निर्देशित') {
document.getElementById('closeXFD_delete_firstcloseAFD_delete_first').disabled = true;
}
}
 
function closeXFD_othercloseAFD_other() {
document.getElementById('closeXFD_extracloseAFD_extra').innerHTML += '<br /><br /><label for="closeXFD_otherclosecloseAFD_otherclose">अन्य: </label><input type="text" id="closeXFD_otherclosecloseAFD_otherclose" name="closeXFD_otherclosecloseAFD_otherclose" />' +
'<input type="button" id="closeXFD_other_delete_buttoncloseAFD_other_delete_button" name="closeXFD_other_delete_buttoncloseAFD_other_delete_button" value="लेख हटाएँ" onclick="closeXFD_otherdeletecloseAFD_otherdelete()" />' +
'<input type="button" id="closeXFD_other_nodelete_buttoncloseAFD_other_nodelete_button" name="closeXFD_other_nodelete_buttoncloseAFD_other_nodelete_button" value="न हटाएँ" onclick="closeXFD_otherkeepcloseAFD_otherkeep()" />';
if (!closeXFD_isAdmincloseAFD_isAdmin) {
document.getElementById('closeXFD_other_delete_buttoncloseAFD_other_delete_button').disabled = true;
}
}
 
function closeXFD_otherdeletecloseAFD_otherdelete() {
document.getElementById('closeXFD_dodeletecloseAFD_dodelete').value = 1;
close = document.getElementById('closeXFD_otherclosecloseAFD_otherclose').value;
closeXFD_closecloseAFD_close(close);
}
 
function closeXFD_otherkeepcloseAFD_otherkeep() {
close = document.getElementById('closeXFD_otherclosecloseAFD_otherclose').value;
closeXFD_closecloseAFD_close(close);
}
 
function closeXFD_closecloseAFD_close(close) {
if (typeof (closeXFD_redirectlimitcloseAFD_redirectlimit) == "undefined") {
closeXFD_redirectlimitcloseAFD_redirectlimit = 50;
}
deleteredirects = false;
if (document.getElementById('closeXFD_deleteredircloseAFD_deleteredir').checked) {
deleteredirects = true;
}
closetype = close;
var dodelete = false;
if (closetype == "हटाया" || document.getElementById('closeXFD_dodeletecloseAFD_dodelete').value == 1) {
dodelete = true;
}
var reason = document.getElementById('closeXFD_reasoncloseAFD_reason').value;
if (reason != '') {
reason = ' ' + reason;
}
if (closetype == "पुनर्निर्देशित" || closetype == "विलय") {
var target = document.getElementById('closeXFD_promptcloseAFD_prompt').value;
if (target == null || target == '') {
displayMessage('<div style="color:red; font-size:120%">' + closetype + ' के लिए लक्ष्य नहीं दिया गया।</div>')
close += " [[" + target + "]] पर ";
}
if (closetype == "पुनर्निर्देशित" && document.getElementById('closeXFD_delete_firstcloseAFD_delete_first').checked == true) {
dodelete = true;
closeXFD_deletenredirectcloseAFD_deletenredirect = target;
}
displayMessage('<ul id="closeXFD_statuscloseAFD_status"></ul><ul id="closeXFD_finishcloseAFD_finish"></ul>');
document.getElementById('closeXFD_finishcloseAFD_finish').innerHTML += '<span id="closeXFD_finished_wrappercloseAFD_finished_wrapper"><span id="closeXFD_finished_maincloseAFD_finished_main" style="display:none"><li id="closeXFD_donecloseAFD_done"><b>पूर्ण हुआ (<a href="/wiki/' + encodeURI(closeXFD_PageNamecloseAFD_PageName) + '?action=purge" title="' + closeXFD_PageNamecloseAFD_PageName + '">पृष्ठ पुनः लोड करें</a>)</b></li></span></span>';
var AFDpage = closeXFD_getPageTextcloseAFD_getPageText(closeXFD_PageNamecloseAFD_PageName);
closeXFD_nomdatecloseAFD_nomdate = /\d{1,2} \D{4,9} \d{4} \(UTC\)/.exec(AFDpage);
AFDpage = AFDpage.replace(/{\{हहेच श्रेणीकरण\|वर्तमान=हाँ\|प्रकार=/, "{{हहेच श्रेणीकरण|वर्तमान=नहीं|प्रकार=");
if (closeXFD_isAdmincloseAFD_isAdmin) {
AFDpage = "{" + "{subst:हहेच शुरू|'''" + close + "''' " + reason + "}}" + "~~" + '~~\n' + AFDpage + '\n{' + '{subst:हहेच अंत}}';
} else {
AFDpage = "{" + "{subst:हहेच शुरू|'''" + close + "''' " + reason + " (non-admin closure)}}" + "~~" + '~~\n' + AFDpage + '\n{' + '{subst:हहेच अंत}}';
}
token = closeXFD_getTokencloseAFD_getToken(true);
var temptitle = wgTitle.substring(wgTitle.indexOf('/') + 1);
pagetitle = temptitle.substring(temptitle.indexOf('/') + 1);
closeXFD_editPagecloseAFD_editPage(closeXFD_PageNamecloseAFD_PageName, AFDpage, token, "चर्चा समाप्त की, परिणाम था:" + close);
//Here we need it to get which namespace its
var AFDlink = '[[' + closeXFD_PageNamecloseAFD_PageName + ']]';
if (wgPageName.indexOf('विकिपीडिया:पृष्ठ_हटाने_हेतु_चर्चा/साँचे/') != -1) {
pagetitlefull = "साँचा:"+pagetitle;
} else if (wgPageName.indexOf('विकिपीडिया:पृष्ठ_हटाने_हेतु_चर्चा/श्रेणियाँ/') != -1) {
pagetitlefull = "श्रेणी:"+pagetitle;
} else {
pagetitlefull = pagetitle;
}
closeXFD_editPage(closeXFD_PageName, AFDpage, token, "चर्चा समाप्त की, परिणाम था:" + close);
var AFDlink = '[[' + closeXFD_PageName + ']]';
if (dodelete) {
if (deleteredirects) {
redirects = closeXFD_getRedirectscloseAFD_getRedirects(pagetitlefullpagetitle);
if (redirects == "toomanyredir") {
document.getElementById('closeXFD_statuscloseAFD_status').innerHTML += '<li>अनुप्रेषित पन्नों की संख्या ' + closeXFD_redirectlimitcloseAFD_redirectlimit + 'की सीमा से अधिक है</li>';
} else if (redirects == "noredir") {
document.getElementById('closeXFD_statuscloseAFD_status').innerHTML += '<li>अनुप्रेषित पन्नें नहीं हैं</li>';
} else {
closeXFD_deleteRedirectscloseAFD_deleteRedirects(pagetitlefullpagetitle, redirects, token);
}
}
closeXFD_deletePagecloseAFD_deletePage(pagetitlefullpagetitle, encodeURIComponent(token), AFDlink, false, false);
closeXFD_deletePage closeAFD_deletePage("वार्ता:" + pagetitle, encodeURIComponent(token), AFDlink, false, false);
//Here too in order to append namespace to talkpage *****************************
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 {
closeXFD_deletePage("वार्ता:" + pagetitle, encodeURIComponent(token), AFDlink, false, false);
}
}
var articlepage = ''
if (closetype != "पुनर्निर्देशित" && closetype != "हटाया" && !dodelete) {
articlepage = closeXFD_getPageTextcloseAFD_getPageText(pagetitlefullpagetitle);
articlepage = articlepage.replace(/{\{हहेच.*|कारण=.*\}\} \n*/, '');
// Here is real crap it misbehaves while removing nomination from Templates *******
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 == "पुनर्निर्देशित") {
articlepage = "#अनुप्रेषित [[" + target + "]]";
if (wgPageName.indexOf('विकिपीडिया:पृष्ठ_हटाने_हेतु_चर्चा/श्रेणियाँ/') != -1) {
articlepage="{{श्रेणी अनुप्रेषित|" + target + "}}";
} else {
articlepage = "#अनुप्रेषित [[" + target + "]]";
}
}
if (!dodelete) {
if (closeXFD_nomdatecloseAFD_nomdate == null) {
closeXFD_nomdatecloseAFD_nomdate = prompt("नामांकन की तारीख?", '');
}
var talkpage = '';
if (closetype != "पुनर्निर्देशित") {
talkpage = closeXFD_getPageTextcloseAFD_getPageText("वार्ता:" + pagetitle);
talkpage = "{" + "{Old AfD multi| date = " + closeXFD_nomdatecloseAFD_nomdate + " | result = '''" + close + "''' | page = " + pagetitlefullpagetitle + " }}\n\n" + talkpage;
} else {
talkpage = "{" + "{Old AfD multi| date = " + closeXFD_nomdatecloseAFD_nomdate + " | result = '''" + close + "''' | page = " + pagetitlefullpagetitle + " }}";
}
if (closetype == "विलय") {
datestring = day + " " + month + " " + year;
articlepage = "{" + "{afd-mergeto|" + target + "|" + debatename + "|" + datestring + "}}\n\n" + articlepage;
var targettalkpage = closeXFD_getPageTextcloseAFD_getPageText("वार्ता:" + target);
targettalkpage = "{" + "{afd-mergefrom|" + pagetitlefullpagetitle + "|" + debatename + "|" + datestring + "}}\n\n" + targettalkpage;
closeXFD_editPagecloseAFD_editPage("Talk:" + target, targettalkpage, token, AFDlink + close + " कर समाप्त किया");
}
closeXFD_editPagecloseAFD_editPage(pagetitlefullpagetitle, articlepage, token, AFDlink + " समाप्त की। परिणाम: " + close);
closeXFD_editPage closeAFD_editPage("वार्ता:" + pagetitle, talkpage, token, AFDlink + " समाप्त की गयी।की। परिणाम: " + close);
// Here same thing, get correct talkpage *******************
if (wgPageName.indexOf('विकिपीडिया:पृष्ठ_हटाने_हेतु_चर्चा/साँचे/') != -1) {
closeXFD_editPage("साँचा वार्ता:" + pagetitle, talkpage, token, AFDlink + " समाप्त की गयी। परिणाम: " + close);
} else if (wgPageName.indexOf('विकिपीडिया:पृष्ठ_हटाने_हेतु_चर्चा/श्रेणियाँ/') != -1) {
closeXFD_editPage("श्रेणी वार्ता:" + pagetitle, talkpage, token, AFDlink + " समाप्त की गयी। परिणाम: " + close);
} else {
closeXFD_editPage("वार्ता:" + pagetitle, talkpage, token, AFDlink + " समाप्त की गयी। परिणाम: " + close);
}
 
}
document.getElementById('closeXFD_finished_maincloseAFD_finished_main').style.display = '';
}
 
function closeXFD_getPageTextcloseAFD_getPageText(title) {
document.getElementById('closeXFD_statuscloseAFD_status').innerHTML += '<li id="closeXFD_getcloseAFD_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('closeXFD_getcloseAFD_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('closeXFD_getcloseAFD_get' + escape(title)).innerHTML = '<a href="/wiki/' + encodeURI(title) + '" title="' + title + '">' + title + '</a> प्राप्त किया जा रहा है';
return pagetext;
}
 
function closeXFD_getTokencloseAFD_getToken(show) {
if (show) {
document.getElementById('closeXFD_statuscloseAFD_status').innerHTML += '<li id="closeXFD_gettokencloseAFD_gettoken">टोकन प्राप्त किया जा रहा है</li>';
}
var req = new XMLHttpRequest();
req.open("GET", wgScriptPath + "/api.php?action=query&prop=info&indexpageids=1&intoken=edit&format=json&titles=" + encodeURIComponent(closeXFD_PageNamecloseAFD_PageName), false);
req.send(null);
var response = eval('(' + req.responseText + ')');
delete req;
if (show) {
document.getElementById('closeXFD_gettokencloseAFD_gettoken').innerHTML = 'टोकन प्राप्त किया जा रहा है';
}
return token;
}
 
function closeXFD_getOldLogcloseAFD_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(closeXFD_PageNamecloseAFD_PageName), false);
req.send(null);
var response = eval('(' + req.responseText + ')');
}
 
function closeXFD_editPagecloseAFD_editPage(title, newtext, token, summary) {
document.getElementById('closeXFD_finished_wrappercloseAFD_finished_wrapper').innerHTML = '<span id="closeXFD_AJAX_finished_closeAFD_AJAX_finished_' + closeXFD_AJAXnumbercloseAFD_AJAXnumber + '" style="display:none">' + document.getElementById('closeXFD_finished_wrappercloseAFD_finished_wrapper').innerHTML + '</span>';
var func_id = closeXFD_AJAXnumbercloseAFD_AJAXnumber;
closeXFD_AJAXnumbercloseAFD_AJAXnumber++;
document.getElementById('closeXFD_statuscloseAFD_status').innerHTML += '<li id="closeXFD_editcloseAFD_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('closeXFD_editcloseAFD_edit' + escape(title)).innerHTML = '<a href="/wiki/' + encodeURI(title) + '" title="' + title + '">' + title + '</a> को सहेजा';
} else {
document.getElementById('closeXFD_editcloseAFD_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('closeXFD_editcloseAFD_edit' + escape(title)).innerHTML = '<div style="color:red"><b><a href="/wiki/' + encodeURI(title) + '" title="' + title + '">' + title + '</a> पर संपादन असफल रहा</b></div>';
}
document.getElementById('closeXFD_AJAX_finished_closeAFD_AJAX_finished_' + func_id).style.display = '';
delete req;
}
}
 
function closeXFD_deletePagecloseAFD_deletePage(title, token, summary, isredirect, retry) {
document.getElementById('closeXFD_finished_wrappercloseAFD_finished_wrapper').innerHTML = '<span id="closeXFD_AJAX_finished_closeAFD_AJAX_finished_' + closeXFD_AJAXnumbercloseAFD_AJAXnumber + '" style="display:none">' + document.getElementById('closeXFD_finished_wrappercloseAFD_finished_wrapper').innerHTML + '</span>';
var func_id = closeXFD_AJAXnumbercloseAFD_AJAXnumber;
closeXFD_AJAXnumbercloseAFD_AJAXnumber++;
if (!isredirect && !retry) {
document.getElementById('closeXFD_statuscloseAFD_status').innerHTML += '<li id="closeXFD_deletecloseAFD_delete' + escape(title) + '"><a href="/wiki/' + encodeURI(title) + '" title="' + title + '">' + title + '</a> को हटाया जा रहा है</li>';
} else if (!retry) {
closeXFD_redircountcloseAFD_redircount++;
thisredir = closeXFD_redircountcloseAFD_redircount
document.getElementById('redirstart').style.display = '';
document.getElementById('redirstart').innerHTML = closeXFD_redirtotalcloseAFD_redirtotal + 'में से' + closeXFD_redircountcloseAFD_redircount + "अनुप्रेषित पन्ने को हटाया जा रहा है";
}
var req = new XMLHttpRequest();
if (response['delete']['title']) {
if (!isredirect) {
document.getElementById('closeXFD_deletecloseAFD_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 = closeXFD_redirtotalcloseAFD_redirtotal + ' में से' + thisredir + " अनुप्रेषित पन्ने को हटाया जा रहा है";
}
}
} catch (err) {
if (response['error']['code'] == "missingtitle") {
document.getElementById('closeXFD_deletecloseAFD_delete' + escape(title)).innerHTML = '<a class="new" href="/wiki/' + encodeURI(title) + '" title="' + title + '">' + title + '</a> मौजूद नहीं है';
} else if (!isredirect) {
if (retry) {
document.getElementById('closeXFD_deletecloseAFD_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 {
closeXFD_deletePagecloseAFD_deletePage(title, token, summary, false, true);
}
} else {
if (retry) {
document.getElementById('closeXFD_statuscloseAFD_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 {
closeXFD_deletePagecloseAFD_deletePage(title, token, summary, true, true);
}
}
}
document.getElementById('closeXFD_AJAX_finished_closeAFD_AJAX_finished_' + func_id).style.display = '';
delete req;
if (!isredirect) {
closeXFD_deletecountcloseAFD_deletecount++;
}
if (closeXFD_deletenredirectcloseAFD_deletenredirect && closeXFD_deletecountcloseAFD_deletecount == 2) {
articletext = '';
articletext = "#अनुप्रेषित [[" + closeXFD_deletenredirectcloseAFD_deletenredirect + "]]";
var AFDlink = '[[' + closeXFD_PageNamecloseAFD_PageName + ']]';
token = closeXFD_getTokencloseAFD_getToken(false);
closeXFD_editPagecloseAFD_editPage(title, articletext, token, AFDlink + "[[" + closeXFD_deletenredirectcloseAFD_deletenredirect + "]] पर अनुप्रेषित कर समाप्त किया।")
}
}
}
 
function closeXFD_getRedirectscloseAFD_getRedirects(page) {
document.getElementById('closeXFD_statuscloseAFD_status').innerHTML += '<li id="closeXFD_getredircloseAFD_getredir">पृष्ठ पर अनुप्रेषित हो रहे पन्ने प्राप्त किये जा रहे हैं</li>';
var url = wgScriptPath + "/api.php?action=query&format=json&action=query&list=backlinks&bltitle=" + encodeURIComponent(page) + "&blfilterredir=redirects&bllimit=" + closeXFD_redirectlimitcloseAFD_redirectlimit
var req = new XMLHttpRequest();
req.open("GET", url, false);
}
delete req;
document.getElementById('closeXFD_getredircloseAFD_getredir').innerHTML = redirects.length + ' पुनर्निर्देशित पृष्ठ प्राप्त किये';
closeXFD_redirtotalcloseAFD_redirtotal = redirects.length;
return redirects;
}
 
function closeXFD_deleteRedirectscloseAFD_deleteRedirects(pagetitle, redirects, token) {
summary = "[[" + closeXFD_PageNamecloseAFD_PageName + "]] के बाद \"" + pagetitlefullpagetitle + "\"पर अनुप्रेषित पन्नों को हटाया जा रहा है";
document.getElementById('closeXFD_statuscloseAFD_status').innerHTML += '<li id="redirstart" style="display:none;"></li><li id="redirend" style="display:none;"></li>';
for (var i = 0; i < closeXFD_redirtotalcloseAFD_redirtotal; i++) {
setTimeout("closeXFD_deletePagecloseAFD_deletePage('" + redirects[i].replace(/'/, "\'") /*'*/ + "', '" + encodeURIComponent(token) + "', '" + summary + "', true, false)", 500 * closeXFD_redircountcloseAFD_redircount);
}
}
 
function closeXFD_addLink() {
addPortletLink("p-cactions", "javascript:closeXFD_init()", "अन्य हहेच समापन", "ca-closeXFD", " अन्य हहेच को करने हेतु औजार");
}
 
jQuery(document).ready(closeXFD_addLink);
}