 function * **************************************** *** twinklebatchundeleteu82ejsu800 batch undelete module **************************************** * mode ofu800 invocation tabu800 "undu800 batch" * active onu800 existing user andu800 project pages * twinkleu82ebatchundelete function twinklebatchundelete ifu800 morebitsu82euserissysop mwu800u82econfigu82egetu800 'wgarticleid' mwu800u82econfigu82egetu800 'wgnamespacenumber' mwu800u82econfigu82egetu800 'wgnamespaceids .user && mwu800u82econfigu82egetu800 'wgnamespacenumber' mwu800u82econfigu82egetu800 'wgnamespaceids .project return; twinkleu82eaddportletlink twinkleu82ebatchundeleteu82ecallback 'u8d8a7u8d8adu8db8cu8d8a7u8db8c u8d8afu8d8b3u8d8aau8d987u8e2808cu8d8acu8d985u8d8b9u8db8c' 'twu800 batch undel' "u8d8a7u8d8adu8db8cu8d8a7u8db8c u8da86u8d986u8d8afu8db8cu8d986 u8d8b5u8d981u8d8adu8d987 u8d8a8u8d987 u8d8b7u8d988u8d8b1 u8d987u8d985u8d8b2u8d985u8d8a7u8d986" ; localized ; twinkleu82ebatchundeleteu82ecallback function twinklebatchundeletecallback varu800 window newu800 morebitsu82esimplewindow 600u800 400u800 ; windowu82esetscriptname 'u8d8aau8d988u8db8cu8d986u8daa9u8d984' ; localized windowu82esettitle 'u8d8a7u8d8adu8db8cu8d8a7u8db8c u8d8afu8d8b3u8d8aau8d987u8e2808cu8d8acu8d985u8d8b9u8db8c' ; localizde windowu82eaddfooterlink 'u8d8b1u8d8a7u8d987u8d986u8d985u8d8a7u8db8c u8d8aau8d988u8db8cu8d986u8daa9u8d984' 'enu800 wpu800 twu800 docu800#batchundelete' ; localized varu800 form newu800 morebitsu82equickform twinkleu82ebatchundeleteu82ecallbacku82eevaluate ; formu82eappend type 'checkbox' list label 'u8d8b5u8d981u8d8adu8d987u8e2808cu8d987u8d8a7u8db8c u8d8a8u8d8adu8d8ab u8d985u8d8b1u8d8aau8d8a8u8d8b7 u8d8a8u8d8a7 u8d8b5u8d981u8d8adu8d987u8e2808cu8d987u8d8a7u8db8c u8d8a7u8d8adu8db8cu8d8a7 u8d8b4u8d8afu8d987 u8d8b1u8d8a7 u8d8afu8d8b1 u8d8b5u8d988u8d8b1u8d8aau8db8c u8daa9u8d987 u8d988u8d8acu8d988u8d8af u8d8afu8d8a7u8d8b4u8d8aau8d987u8e2808cu8d8a7u8d986u8d8afu8d88c u8d8a7u8d8adu8db8cu8d8a7 u8daa9u8d986' localized name 'undel_talk' value 'undel_talk' checked true ; formu82eappend type 'input' name 'reason' label 'u8d8afu8d984u8db8cu8d984 ' localized size 60u800 ; varu800 statusdiv documentu82ecreateelement 'divu800' ; statusdivu82estyleu82epadding '15px'; just sou800 itu800 doesn'tu800 look broken windowu82esetcontent statusdiv ; morebitsu82estatusu82einit statusdiv ; windowu82edisplay ; varu800 query 'action' 'query' 'generator' 'links 'prop' 'info' 'inprop' 'protection' 'titles mwu800u82econfigu82egetu800 'wgpagename' 'gpllimit' twinkleu82egetpref 'batchmax' ; varu800 statelem newu800 morebitsu82estatus 'u8d8aau8d987u8db8cu8d987u8d994 u8d981u8d987u8d8b1u8d8b3u8d8aa u8d8b5u8d981u8d8adu8d987u8e2808cu8d987u8d8a7' ; localized varu800 wikipedia_api newu800 morebitsu82ewikiu82eapiu800 'u8d8afu8d8b1 u8d8adu8d8a7u8d984 u8d8a8u8d8a7u8d8b1u8daafu8db8cu8d8b1u8db8c...' query function apiobj localized varu800 xmlu800 apiobju82eresponsexml; varu800 pages xmlu800 .find 'page missing ' ; varu800 list ; pagesu82eeach function index page varu800 page page ; varu800 title pageu82eattr 'title' ; varu800 editprot pageu82efind 'pru800 type "create" level "sysop" ' ; varu800 isprotected editprotu82elength 0u800; listu82epush label title isprotected ' u8d985u8d8adu8d8a7u8d981u8d8b8u8d8aau8e2808cu8d8b4u8d8afu8d987 u8d8afu8d8b1 u8d8a8u8d8b1u8d8a7u8d8a8u8d8b1 u8d8a7u8db8cu8d8acu8d8a7u8d8af' editprotu82eattr 'expiry' 'infinity' ' u8d8a8u8d987 u8d8b5u8d988u8d8b1u8d8aa u8d8a8u8db8cu8e2808cu8d9beu8d8a7u8db8cu8d8a7u8d986' 'u8d88c u8d8a7u8d986u8d982u8d8b6u8d8a7 u8d8afu8d8b1 ' newu800 morebitsu82edate editprotu82eattr 'expiry' .calendar 'utcu800' ' utcu800 ' ' '   localized value title checked true style isprotected 'color redu800'   ; ; apiobju82eparamsu82eformu82eappend type 'header' label 'u8d8b5u8d981u8d8adu8d987u8e2808cu8d987u8d8a7 u8d8a8u8d8b1u8d8a7u8db8c u8d8a7u8d8adu8db8cu8d8a7' ; localized apiobju82eparamsu82eformu82eappend type 'button' label 'u8d8a7u8d986u8d8aau8d8aeu8d8a7u8d8a8 u8d987u8d985u8d987' localized event function eu800 morebitsu82equickformu82egetelements eu800u82etargetu82eform 'pages .prop 'checked' true ; ; apiobju82eparamsu82eformu82eappend type 'button' label 'u8d8a7u8d986u8d8aau8d8aeu8d8a7u8d8a8 u8d987u8db8cu8da86u8e2808cu8daa9u8d8afu8d8a7u8d985' localized event function eu800 morebitsu82equickformu82egetelements eu800u82etargetu82eform 'pages .prop 'checked' false ; ; apiobju82eparamsu82eformu82eappend type 'checkbox' name 'pages list list ; apiobju82eparamsu82eformu82eappend type 'submit' ; varu800 result apiobju82eparamsu82eformu82erender ; apiobju82eparamsu82ewindowu82esetcontent result ; morebitsu82echeckboxshiftclicksupport morebitsu82equickformu82egetelements result 'pages ; statelem ; wikipedia_apiu82eparams form form window window ; wikipedia_apiu82epost ; ; twinkleu82ebatchundeleteu82ecallbacku82eevaluate function event morebitsu82ewikiu82eactioncompletedu82enotice 'u8d8a7u8d8adu8db8cu8d8a7u8db8c u8d8afu8d8b3u8d8aau8d987u8e2808cu8d8acu8d985u8d8b9u8db8c u8daa9u8d8a7u8d985u8d984 u8d8b4u8d8af'; localized varu800 numprotected morebitsu82equickformu82egetelements eventu82etarget 'pages .filter function index element return elementu82echecked && elementu82enextelementsiblingu82estyleu82ecolor 'redu800'; .length; ifu800 numprotected 0u800 && confirm 'u8d8b4u8d985u8d8a7 u8d8afu8d8b1 u8d8adu8d8a7u8d984 u8d8a7u8d8adu8db8cu8d8a7u8db8c ' numprotected ' u8d8b5u8d981u8d8adu8d987 u8d987u8d8b3u8d8aau8db8cu8d8af u8daa9u8d987 u8d8afu8d8b1 u8d8a8u8d8b1u8d8a7u8d8a8u8d8b1 u8d8a7u8db8cu8d8acu8d8a7u8d8af u8d985u8d8adu8d8a7u8d981u8d8b8u8d8aa u8d8b4u8d8afu8d987u8e2808cu8d8a7u8d986u8d8af. u8d8a2u8db8cu8d8a7 u8d985u8d8b7u8d985u8d8a6u8d986 u8d987u8d8b3u8d8aau8db8cu8d8afu8d89f' localized return; varu800 pages eventu82etargetu82egetchecked 'pages ; varu800 reason eventu82etargetu82ereasonu82evalue; varu800 undel_talk eventu82etargetu82ereasonu82evalue; ifu800 reason alert 'u8d8a8u8d8a7u8db8cu8d8af u8d8afu8d984u8db8cu8d984u8db8c u8d8a7u8d8b1u8d8a7u8d8a6u8d987 u8daa9u8d986u8db8cu8d8af ' ; localized return; morebitsu82esimplewindowu82esetbuttonsenabled false ; morebitsu82estatusu82einit eventu82etarget ; ifu800 pages morebitsu82estatusu82eerror 'error' 'u8da86u8db8cu8d8b2u8db8c u8d8a8u8d8b1u8d8a7u8db8c u8d8a7u8d8adu8db8cu8d8a7 u8d985u8d988u8d8acu8d988u8d8af u8d986u8db8cu8d8b3u8d8aau8d88c u8d8a7u8d8adu8db8cu8d8a7 u8d985u8d8aau8d988u8d982u8d981 u8d8b4u8d8af' ; localized return; varu800 pageundeleter newu800 morebitsu82ebatchoperation 'undeleting pages ; pageundeleteru82esetoption 'chunksize' twinkleu82egetpref 'batchundeletechunks ; pageundeleteru82esetoption 'preserveindividualstatuslines true ; pageundeleteru82esetpagelist pages ; pageundeleteru82erunu800 function pagename varu800 params page pagename undel_talk undel_talk reason reason pageundeleter pageundeleter ; varu800 wikipedia_page newu800 morebitsu82ewikiu82epage pagename 'u8d8a7u8d8adu8db8cu8d8a7u8db8c u8d8b5u8d981u8d8adu8d987u8d994 ' pagename ; localized wikipedia_pageu82esetcallbackparameters params ; wikipedia_pageu82eseteditsummary reason twinkleu82egetpref 'deletionsummaryad' ; wikipedia_pageu82esuppressprotectwarning ; wikipedia_pageu82esetmaxretries 3u800 ; temporary increase from 2u800 tou800 make batchundelete more likely tou800 succeed phab t222402 #613u800 wikipedia_pageu82eundeletepage twinkleu82ebatchundeleteu82ecallbacksu82edoextras pageundeleteru82eworkerfailure ; ; ; twinkleu82ebatchundeleteu82ecallbacks this stupid parameter name isu800 au800 temporary thing until iu800 implement anu800 overhaul ofu800 morebitsu82ewikiu82e* callback parameters doextras function thingwithparameters varu800 params thingwithparametersu82eparent thingwithparametersu82eparentu82egetcallbackparameters thingwithparametersu82egetcallbackparameters ; theu800 initial batch operation operation'su800 jobu800 isu800 tou800 delete theu800 page andu800 that hasu800 succeeded byu800 nowu800 paramsu82epageundeleteru82eworkersuccess thingwithparameters ; varu800 query wikipedia_api; ifu800 paramsu82eundel_talk varu800 talkpagename newu800 mwu800u82etitle paramsu82epage .gettalkpage .getprefixedtext ; ifu800 talkpagename paramsu82epage query 'action' 'query' 'prop' 'deletedrevisions 'drvprop' 'idsu800 'drvlimit' 1u800 'titles talkpagename ; wikipedia_api newu800 morebitsu82ewikiu82eapiu800 'u8d8a8u8d8b1u8d8b1u8d8b3u8db8c u8d8b5u8d981u8d8adu8d987u8d994 u8d8a8u8d8adu8d8ab u8d8a8u8d8b1u8d8a7u8db8c u8d986u8d8b3u8d8aeu8d987u8e2808cu8d987u8d8a7u8db8c u8d8adu8d8b0u8d981u8e2808cu8d8b4u8d8afu8d987' query twinkleu82ebatchundeleteu82ecallbacksu82eundeletetalk ; localized wikipedia_apiu82eparams params; wikipedia_apiu82eparamsu82etalkpage talkpagename; wikipedia_apiu82epost ; undeletetalk function apiobj varu800 xmlu800 apiobju82eresponsexml; varu800 exists xmlu800 .find 'page notu800 missing ' .length 0u800; varu800 delrevs xmlu800 .find 'revu800' .attr 'revid' ; ifu800 exists delrevs page exists oru800 hasu800 nou800 deleted revisions; forget about itu800 return; varu800 page newu800 morebitsu82ewikiu82epage apiobju82eparamsu82etalkpage 'u8d8a7u8d8adu8db8cu8d8a7u8db8c u8d8b5u8d981u8d8adu8d987u8d994 u8d8a8u8d8adu8d8ab ' apiobju82eparamsu82epage ; localized pageu82eseteditsummary 'u8d8a7u8d8adu8db8cu8d8a7u8db8c u8d8b1u8d8a7u8d987u8d986u8d985u8d8a7 u8d8b5u8d981u8d8adu8d987 u8d8a8u8d8adu8d8ab u8d8b5u8d981u8d8adu8d987u8d994 u8d8a8u8d8adu8d8ab "' apiobju82eparamsu82epage '"' twinkleu82egetpref 'deletionsummaryad' ; localized pageu82eundeletepage ; ; jquery ; 