Notice: Only variables should be passed by reference in /home/wiki/wafarin.com/core/class.site.php on line 523

Warning: filesize(): stat failed for /home2/cache/similar_articles_cache/11/ba/11ba8dc3ce4f1e6e37d4de094999f38c.cache in /home/wiki/wafarin.com/core/class.cache.php on line 102

Notice: Only variables should be passed by reference in /home/wiki/wafarin.com/core/class.site.php on line 390

Notice: Only variables should be passed by reference in /home/wiki/wafarin.com/core/class.site.php on line 390

Warning: Undefined array key 0 in /home/wiki/wafarin.com/core/class.site.php on line 370

Warning: Trying to access array offset on value of type null in /home/wiki/wafarin.com/core/class.site.php on line 370

Warning: Undefined array key "page_added_dt" in /home/wiki/wafarin.com/pages/data_article.php on line 36

Warning: Undefined array key 7286714 in /home/wiki/wafarin.com/pages/data_article.php on line 79

Warning: Trying to access array offset on value of type null in /home/wiki/wafarin.com/pages/data_article.php on line 79

Warning: Undefined array key 7286714 in /home/wiki/wafarin.com/pages/data_article.php on line 82

Warning: Trying to access array offset on value of type null in /home/wiki/wafarin.com/pages/data_article.php on line 82

Warning: Undefined array key 7286714 in /home/wiki/wafarin.com/pages/data_article.php on line 83

Warning: Trying to access array offset on value of type null in /home/wiki/wafarin.com/pages/data_article.php on line 83

Warning: Undefined array key 7286714 in /home/wiki/wafarin.com/pages/data_article.php on line 84

Warning: Trying to access array offset on value of type null in /home/wiki/wafarin.com/pages/data_article.php on line 84

Warning: Undefined array key 7286714 in /home/wiki/wafarin.com/pages/data_article.php on line 85

Warning: Trying to access array offset on value of type null in /home/wiki/wafarin.com/pages/data_article.php on line 85

Warning: Undefined array key 7286714 in /home/wiki/wafarin.com/pages/data_article.php on line 86

Warning: Trying to access array offset on value of type null in /home/wiki/wafarin.com/pages/data_article.php on line 86

Warning: Undefined array key 7286714 in /home/wiki/wafarin.com/pages/data_article.php on line 98

Warning: Trying to access array offset on value of type null in /home/wiki/wafarin.com/pages/data_article.php on line 98

Warning: Undefined variable $img2 in /home/wiki/wafarin.com/pages/data_article.php on line 119

Warning: Undefined variable $uri in /home/wiki/wafarin.com/pages/data_article.php on line 139

Warning: Undefined variable $img2 in /home/wiki/wafarin.com/pages/data_article.php on line 163

Warning: Undefined array key 7286714 in /home/wiki/wafarin.com/pages/data_article.php on line 164

Warning: Trying to access array offset on value of type null in /home/wiki/wafarin.com/pages/data_article.php on line 164

Warning: Undefined array key 7286714 in /home/wiki/wafarin.com/pages/data_article.php on line 164

Warning: Trying to access array offset on value of type null in /home/wiki/wafarin.com/pages/data_article.php on line 164
article title for Gadget-featuredlists.js on wafarin.com

Interested Article - Gadget-featuredlists.js

????? ?????????? ??? ???????? ????????? ???????? ??? ???????? .
????????, ???? ??? ?????????????? .

/* <nowiki>
 * ?????? ??? [[??:????]]
 * ?????????? — ?? [[?????????:???????/?????? ??????? «????????? ?????? ? ???????»]]
 * ?? ?????? ????? [[?:Claymore/goodarticles.js]] ? [[?:Serpent Vlad/featuredarticles.js]], 
 [[?:NoFrost/featuredlists.js]]
 * ????????: GNU GPL
 * ??????: Claymore, Serpent Vlad, Saint Johann, NoFrost
 */

if( typeof( wfAnchorEncode ) != "function" ) {
	function wfAnchorEncode(str) {
		str = encodeURIComponent( str );
		str = str.replace( /%/g, "." );
		str = str.replace( /\.20/g, "_" );
		str = str.replace( /\.3A/g, ":" );
		return str;
	}
}

function ch( o ) { for( var i in o ) { return o[i] } }

function replTitle(regex) {
	var title = mw.config.get('wgPageName').replace( /\_/g, " " );
	if(regex){
		title = title.replace( /\(/g, "\\(" );
		title = title.replace( /\)/g, "\\)" );
		title = title.replace( /\,/g, "\\," );
		title = title.replace( /\-/g, "\\-" );
		title = title.replace( /\—/g, "\\—" );
		title = title.replace( /\«/g, "\\«" );
		title = title.replace( /\»/g, "\\»" );
	}
	return title;
}

function isOfficer() {
	// ?????? ?????????? ??????? ????????? ?????? ? ??????? ??????????? ?? [[MediaWiki:Gadget-featuredlists.json]]
	var officerList = require( './featuredlists.json' );
	return officerList.includes( mw.config.get( 'wgUserName' ) );
}

function sendError( textError ) {
	var sectiontext = "== ?????? ??????? ==";
	var talktext = "??? ???????? ???????? [[" + replTitle() + "]] [[MediaWiki:Gadget-featuredlists.js|??????]] ?? ???????? ??-?? ????????? ??????: " + textError + ". ~~\~~\n";
	
	var uri = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/api.php?format=json&action=edit&title=' + encodeURIComponent( '?????????? MediaWiki:Gadget-featuredlists.js' );
		var rq = "summary=" + encodeURIComponent( '????????? ?? ?????? ? ?????? ??????? ???????? ????' ) +
							"&section=" + encodeURIComponent( 'new' ) +
							"&sectiontitle=" + encodeURIComponent( sectiontext ) +
							"&text=" + encodeURIComponent( talktext ) +
							"&token=" + encodeURIComponent( wgMakeFLP.edittoken );

		wgMakeFLP.rq.onreadystatechange = wgMakeFLP.onNominationFalse;
		wgMakeFLP.rq.open( "POST", uri, true );
		wgMakeFLP.rq.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded' );
		wgMakeFLP.rq.send( rq );
}
	
var wgMakeFLP = {
	'rq' : null,
	'newtext' : '',
	'talktext' : '',
	'editsummary' : '',
	'edittoken' : '',
	'date' : '',
	'isPortal' : false,
	'months' : {
		'0' : '??????',
		'1' : '???????',
		'2' : '????',
		'3' : '??????',
		'4' : '???',
		'5' : '????',
		'6' : '????',
		'7' : '??????',
		'8' : '????????',
		'9' : '???????',
		'10' : '??????',
		'11' : '???????'
	},
	'months_to' : {
		'0' : '??????',
		'1' : '???????',
		'2' : '?????',
		'3' : '??????',
		'4' : '???',
		'5' : '????',
		'6' : '????',
		'7' : '???????',
		'8' : '????????',
		'9' : '???????',
		'10' : '??????',
		'11' : '???????'
	},
	summarySuffix : '(? ??????? [[MediaWiki:Gadget-featuredlists.js|??????? ??????? «????????? ?????? ? ???????»]])',

	'addMakeFeaturedTab' : function() {
		if( !document.getElementById( 'mw-indicator-fl-candidate' ) ) return;

		mw.loader.using('mediawiki.util').done( function() {
			mw.util.addPortletLink( 'p-cactions', 'javascript:wgMakeFLP.makeFeatured()',
									'??????? ???', 'ca-make-flp', '??????? ?????? ??? ?????? ?????????' );
		} );
	},

	'onTextDownload' : function() {
		if( this.readyState != 4 ) return;
		if( this.status != 200 ) return;

		result = eval('('+this.responseText+')');
		var pgtext = ch(result.query.pages).revisions[0]['*'];
		var nominationRegex = /\{{2}???????? ? ????????? ?????? ? ???????\|(\d{4})-(\d{2})-(\d{2})\}{2}/i;
		if (!pgtext.match(nominationRegex)) {
			alert('?????????????? ??????????: ??? ???? (???? ??? ??????? ???????) ? ??????? ????????? ? ????????? ?????? ??? ??????? (???????? ??????????? ? ???????)'); 
			sendError('??? ???? (???? ??? ??????? ???????) ? ??????? ????????? ? ????????? ?????? ??? ??????? (???????? ??????????? ? ???????) — ? <onTextDownload>');
			return;
		}
		var match = pgtext.match( nominationRegex );
		wgMakeFLP.date = match[1] + '-' + match[2] + '-' + match[3];
		wgMakeFLP.isPortal = ( mw.config.get('wgNamespaceNumber') === 100 ? true : false );
		wgMakeFLP.newtext = pgtext.replace( nominationRegex, '{{????????? ?????? ??? ??????|???=' + ( wgMakeFLP.isPortal ? '??????' : '??????' ) + '}}' );
		var today = '{{' + 'subst:CURRENTDAY}} {{' + 'subst:CURRENTMONTHNAMEGEN}} {{' + 'subst:CURRENTYEAR}}';
		
		wgMakeFLP.talktext = '{{????????? ' + ( wgMakeFLP.isPortal ? '??' : '???') + '|' + wgMakeFLP.date + '|' + today + '|' + replTitle() + '}}\n';
		wgMakeFLP.editsummary = (wgMakeFLP.isPortal ? "??????" : "??????") + " [[" + replTitle() + "]] [[??:???|??????]] " + wgMakeFLP.summarySuffix;
		
		var uri = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/api.php?format=json&action=query&prop=info&meta=tokens&type=csrf&titles=' + encodeURIComponent( mw.config.get('wgPageName') );
		wgMakeFLP.rq.onreadystatechange = wgMakeFLP.onTokenDownload;
		wgMakeFLP.rq.open( "GET", uri, true );
		wgMakeFLP.rq.send( "" );
	},

	'onTokenDownload' : function() {
		if( this.readyState != 4 ) return;
		if( this.status != 200 ) return;

		result = eval('('+this.responseText+')');
		wgMakeFLP.edittoken = result.query.tokens.csrftoken;
		if( !wgMakeFLP.edittoken ) {
			alert( '?????????????? ?????????? – ?? ???? ???????? ?????!' );
			sendError('?? ???? ???????? ?????');
			return;
		} else {
			alert('????? ???????...');
		}

		var uri = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/api.php?format=json&action=edit&title=' + encodeURIComponent( mw.config.get('wgPageName') );
		var rq = "summary=" + encodeURIComponent( wgMakeFLP.editsummary ) +
							"&text=" + encodeURIComponent( wgMakeFLP.newtext ) +
							"&token=" + encodeURIComponent( wgMakeFLP.edittoken );

		wgMakeFLP.rq.onreadystatechange = wgMakeFLP.onEditSaved;
		wgMakeFLP.rq.open( "POST", uri, true );
		wgMakeFLP.rq.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded' );
		wgMakeFLP.rq.send( rq );
	},

	'onEditSaved' : function() {
		if( this.readyState != 4 ) return;
		if( this.status != 200 ) return;

		result = eval('('+this.responseText+')');
		if( typeof( result.error ) != 'undefined' ) {
			alert( "?? ??????? ????????? ????????: " + result.error.info );
			sendError(result.error.info + ' — ? <onEditSaved>');
			return;
		} else {
			alert('???????? ' + mw.config.get('wgPageName') + ' ?????????...');
		}

		var uri = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/api.php?format=json&action=edit&title=' + encodeURIComponent( '??????????' + (wgMakeFLP.isPortal ? ' ???????': '') + ':' + mw.config.get('wgPageName') );
		var rq = "summary=" + encodeURIComponent( wgMakeFLP.editsummary ) +
							"&prependtext=" + encodeURIComponent( wgMakeFLP.talktext ) +
							"&token=" + encodeURIComponent( wgMakeFLP.edittoken );

		wgMakeFLP.rq.onreadystatechange = wgMakeFLP.onNominationSaved;
		wgMakeFLP.rq.open( "POST", uri, true );
		wgMakeFLP.rq.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded' );
		wgMakeFLP.rq.send( rq );  
	},

	'onNominationSaved' : function() {
		if( this.readyState != 4 ) return;
		if( this.status != 200 ) return;

		result = eval('('+this.responseText+')');
		if( typeof( result.error ) != 'undefined' ) {
			alert( "?? ??????? ????????? ????????: " + result.error.info );
			sendError(result.error.info + ' — ? <onNominationSaved>');
			return;
		} else {
			alert('???????? ?????????? ???????? ' + mw.config.get('wgPageName') + ' ?????????...');
		}

		var uri = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/api.php?format=json&action=query&prop=revisions&rvprop=content&rvlimit=1&titles=' +
							encodeURIComponent( '?????????:?????????_?_?????????_??????_?_???????' );
		wgMakeFLP.rq.onreadystatechange = wgMakeFLP.onLogDownload;
		wgMakeFLP.rq.open( "GET", uri, true );
		wgMakeFLP.rq.send( "" );  
	},

	'onLogDownload' : function() {
		if( this.readyState != 4 ) return;
		if( this.status != 200 ) return;

		result = eval('('+this.responseText+')');
		var pgtext = ch(result.query.pages).revisions[0]['*'];
		var nominationRegex = "\\|-(?: {0,})\\n(?:\\|(?: {0,})(?:rowspan=\"?(?:\\d+)\"?(?: {0,})\\|(?: {0,}))?\\[{2}(?:?????????|??):????????? ? ????????? ?????? ? ???????\\/" + wgMakeFLP.date + "\\|\\d{1,2} [?-?]+\\]{2}(?: {0,})\\n)?\\|(?: {0,})\\[{2}" + replTitle(true) + "\\]{2}(?: {0,})\\n\\|(?: {0,})(?:.*)(?: {0,})\\n\\|(?: {0,})(.*)(?: {0,})";
		
		if (!pgtext.match(nominationRegex)) {
			alert('?????????????? ??????????: ?? ??????? ????????????? ?????? ? ?????? <?????????:????????? ? ????????? ?????? ? ???????>');
			sendError('?? ??????? ????????????? ?????? ? ?????? [[?????????:????????? ? ????????? ?????? ? ???????]]');
			return;
		}
		var match = pgtext.match( nominationRegex );
	
		var allText = match[0];
		var endText = match[1];
		
		var text = allText.replace( '|-', '|- style="background-color:gold;"');
		text = text.replace( endText, ( wgMakeFLP.isPortal ? "??????" : "??????" ) + ' ??????' );
			
		wgMakeFLP.newtext = pgtext.replace( allText, text);
		wgMakeFLP.editsummary = ( wgMakeFLP.isPortal ? "??????" : "??????" ) + " [[" + replTitle() + "]] ?????? " + wgMakeFLP.summarySuffix;
		
		var uri = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/api.php?format=json&action=edit&title=' +
							encodeURIComponent( '?????????:?????????_?_?????????_??????_?_???????' );
		var rq = "summary=" + encodeURIComponent( wgMakeFLP.editsummary ) +
							"&text=" + encodeURIComponent( wgMakeFLP.newtext ) +
							"&token=" + encodeURIComponent( wgMakeFLP.edittoken );

		wgMakeFLP.rq.onreadystatechange = wgMakeFLP.onLogSaved;
		wgMakeFLP.rq.open( "POST", uri, true );
		wgMakeFLP.rq.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded' );
		wgMakeFLP.rq.send( rq );
	},

	'onLogSaved' : function() {
		if( this.readyState != 4 ) return;
		if( this.status != 200 ) return;

		result = eval('('+this.responseText+')');
		if( typeof( result.error ) != 'undefined' ) {
			alert( "?? ??????? ????????? ????????: " + result.error.info );
			sendError(result.error.info + ' — ? <onLogSaved>');
			return;
		} else {
			alert('???????? <?????????:????????? ? ????????? ?????? ? ???????> ?????????...');
		}

		var uri = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/api.php?format=json&action=query&prop=revisions&rvprop=content&rvlimit=1&titles=' +
							encodeURIComponent( '?????????:?????????_??????_?_???????/??????_????????' );
		wgMakeFLP.rq.onreadystatechange = wgMakeFLP.onLogDownloadTwo;
		wgMakeFLP.rq.open( "GET", uri, true );
		wgMakeFLP.rq.send( "" );
	},
	
	'onLogDownloadTwo' : function() {
		if( this.readyState != 4 ) return;
		if( this.status != 200 ) return;
			
		result = eval('('+this.responseText+')');
		var pgtext = ch(result.query.pages).revisions[0]['*'];
		var nominationRegex = "={2} ????????? " + ( wgMakeFLP.isPortal ? "???????": "??????" ) + " ={2}(?: {0,})\\n<!\\-\\- (?:.*) \\-\\->\\n<onlyinclude>(?:.*)\\|(?: {0,})\\n";
		
		if (!pgtext.match(nominationRegex)) {
			alert('?????????????? ??????????: ?? ??????? ????????????? ?????? ? ?????? <????????? ?????? ? ???????/?????? ????????>');
			sendError('?? ??????? ????????????? ?????? ? ?????? [[?????????:????????? ?????? ? ???????/?????? ????????]]');
			return;
		}
		var match = pgtext.match( nominationRegex );
	
		var newText = "\n# [[" + replTitle() + "]] ??????. [[?:{{" + "subst:REVISIONUSER}}|{{" + "subst:REVISIONUSER}}]] ~" + "~~" + "~~\n";
	
		wgMakeFLP.newtext = pgtext.replace(match[0],match[0] + newText);
		wgMakeFLP.editsummary = ( wgMakeFLP.isPortal ? "??????" : "??????" ) + " [[" + replTitle() + "]] ?????? "+ wgMakeFLP.summarySuffix;
	
		var uri = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/api.php?format=json&action=edit&title=' +
							encodeURIComponent( '?????????:?????????_??????_?_???????/??????_????????' );
		var rq = "summary=" + encodeURIComponent( wgMakeFLP.editsummary ) +
							"&text=" + encodeURIComponent( wgMakeFLP.newtext ) +
							"&token=" + encodeURIComponent( wgMakeFLP.edittoken );

		wgMakeFLP.rq.onreadystatechange = wgMakeFLP.onListDownload;
		wgMakeFLP.rq.open( "POST", uri, true );
		wgMakeFLP.rq.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded' );
		wgMakeFLP.rq.send( rq );
	},

	'onListDownload' : function() {
		if( this.readyState != 4 ) return;
		if( this.status != 200 ) return;

		result = eval('('+this.responseText+')');
		if( typeof( result.error ) != 'undefined' ) {
			alert( "?? ??????? ????????? ????????: " + result.error.info );
			sendError(result.error.info + ' — ? <onListDownload>');
			return;
		} else {
			alert('???????? <?????????:????????? ?????? ? ???????/?????? ????????> ?????????...');
		}
	
	var now = new Date();
	nowYear = now.getFullYear();
	nowMonth = now.getMonth();
	
	var uri = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/api.php?format=json&action=query&prop=revisions&rvprop=content&rvlimit=1&titles=' +
							encodeURIComponent( '?????????:?????????_?_?????????_??????_?_???????/?????/' + wgMakeFLP.months[nowMonth] + '_' + nowYear );   
		wgMakeFLP.rq.onreadystatechange = wgMakeFLP.arxivDownload;
		wgMakeFLP.rq.open( "GET", uri, true );
		wgMakeFLP.rq.send( "" );
	},

	'arxivDownload' : function() {
		if( this.readyState != 4 ) return;
		if( this.status != 200 ) return;

		result = eval('('+this.responseText+')');
		var pgtext = ch(result.query.pages).revisions[0]['*'];
	
	var date = wgMakeFLP.date.split('-');
	var nominationDate = date[2] + ' ' + wgMakeFLP.months_to[date[1] - 1];
		var today = '{{' + 'subst:CURRENTDAY}} {{' + 'subst:CURRENTMONTHNAMEGEN}} {{' + 'subst:CURRENTYEAR}}';
		var reText = '|- style="background-color:gold;"\n| [[?????????:????????? ? ????????? ?????? ? ???????/' + wgMakeFLP.date + '|' + nominationDate + ']]\n| [[' + replTitle() + ']]\n| ?????? ???????? ' + today + ' ????\n|}';
	
		wgMakeFLP.newtext = pgtext.replace( '|}', reText );
		wgMakeFLP.editsummary = (wgMakeFLP.isPortal ? "??????": "??????") + " [[" + replTitle() + "]] [[??:???|??????]] " + wgMakeFLP.summarySuffix;
	
		var uri = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/api.php?format=json&action=edit&title=' +
							encodeURIComponent( '?????????:?????????_?_?????????_??????_?_???????/?????/' + wgMakeFLP.months[nowMonth] + '_' + nowYear );
		var rq = "summary=" + encodeURIComponent( wgMakeFLP.editsummary ) +
							"&text=" + encodeURIComponent( wgMakeFLP.newtext ) +
							"&token=" + encodeURIComponent( wgMakeFLP.edittoken );

		wgMakeFLP.rq.onreadystatechange = wgMakeFLP.onArxivDownload;
		wgMakeFLP.rq.open( "POST", uri, true );
		wgMakeFLP.rq.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded' );
		wgMakeFLP.rq.send( rq );  
	},

	'onArxivDownload' : function() {
		if( this.readyState != 4 ) return;
		if( this.status != 200 ) return;

		result = eval('('+this.responseText+')');
		if( typeof( result.error ) != 'undefined' ) {
			alert( "?? ??????? ????????? ????????: " + result.error.info );
			sendError(result.error.info + ' — ? <onArxivDownload>');
			return;
		} else {
			mw.notify('???????? ?????? ?????????...');
		}

	mw.notify( '???????? ??????? ???????. <a href="javascript:location.reload()">????????????? ????????</a>' );
	},

	'onNominationFalse' : function() {
		if( this.readyState != 4 ) return;
		if( this.status != 200 ) return;

		result = eval('('+this.responseText+')');
		if( typeof( result.error ) != 'undefined' ) {
			alert( "?? ??????? ????????? ????????: " + result.error.info );
			return;
		}   

	mw.notify( '<b>???????? ?? ???????!</b> ??????????? ???????? ?? [[?????????? MediaWiki:Gadget-featuredlists.js|?? ???? ????????]]. <a href="javascript:location.reload()">????????????? ????????</a>' );
	},
	
	'makeFeatured' : function() {
		var uri = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/api.php?format=json&action=query&prop=revisions&rvprop=content&rvlimit=1&titles=' + encodeURIComponent( mw.config.get('wgPageName') );
		this.rq = new XMLHttpRequest();
		this.rq.onreadystatechange = this.onTextDownload;
		this.rq.open( "GET", uri, true );
		this.rq.send( "" );
	}
}


var wgDenyFLP = {
	'rq' : null,
	'newtext' : '',
	'talktext' : '',
	'editsummary' : '',
	'edittoken' : '',
	'date' : '',
	'isPortal': false,
	'months' : {
		'0' : '??????',
		'1' : '???????',
		'2' : '????',
		'3' : '??????',
		'4' : '???',
		'5' : '????',
		'6' : '????',
		'7' : '??????',
		'8' : '????????',
		'9' : '???????',
		'10' : '??????',
		'11' : '???????'
	},
	'months_to' : {
		'0' : '??????',
		'1' : '???????',
		'2' : '?????',
		'3' : '??????',
		'4' : '???',
		'5' : '????',
		'6' : '????',
		'7' : '???????',
		'8' : '????????',
		'9' : '???????',
		'10' : '??????',
		'11' : '???????'
	},

	'addDenyTab' : function() {
		if( !document.getElementById( 'mw-indicator-fl-candidate' ) ) return;

		mw.loader.using('mediawiki.util').done( function() {
			mw.util.addPortletLink( 'p-cactions', 'javascript:wgDenyFLP.deny()',
									'???????? ???', 'ca-deny-flp', '???????? ? ??????? ?????????? ?????? ??? ???????' );
		} );
	},

	'onTextDownload' : function() {
		if( this.readyState != 4 ) return;
		if( this.status != 200 ) return;

		result = eval('('+this.responseText+')');
		var pgtext = ch(result.query.pages).revisions[0]['*'];
		var nominationRegex = /\{{2}???????? ? ????????? ?????? ? ???????\|(\d{4})-(\d{2})-(\d{2})\}{2}/i;
		if (!pgtext.match(nominationRegex)) {
			alert('?????????????? ??????????: ??? ???? (???? ??? ??????? ???????) ? ??????? ????????? ? ????????? ?????? ??? ??????? (???????? ??????????? ? ???????)'); 
			sendError('??? ???? (???? ??? ??????? ???????) ? ??????? ????????? ? ????????? ?????? ??? ??????? (???????? ??????????? ? ???????)');
			return;
		}
		var match = pgtext.match( nominationRegex );
		wgDenyFLP.date = match[1] + '-' + match[2] + '-' + match[3];
		wgDenyFLP.isPortal = ( mw.config.get('wgNamespaceNumber') === 100 ? true : false );
		wgDenyFLP.newtext = pgtext.replace( nominationRegex, '' );
		var today = '{{' + 'subst:CURRENTDAY}} {{' + 'subst:CURRENTMONTHNAMEGEN}} {{' + 'subst:CURRENTYEAR}}';
		
		wgDenyFLP.talktext = '{{????????? ' + ( wgDenyFLP.isPortal ? '??' : '???') + '|' + wgDenyFLP.date + '|' + today + '|????????}}\n';
	wgDenyFLP.editsummary = ( wgDenyFLP.isPortal ? "??????" : "??????" ) + " [[" + replTitle() + "]] ????????? ?? ????????? [[??:???]] " + wgMakeFLP.summarySuffix;
		
	var uri = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/api.php?format=json&action=query&prop=info&meta=tokens&type=csrf&titles=' + encodeURIComponent( mw.config.get('wgPageName') );
		wgDenyFLP.rq.onreadystatechange = wgDenyFLP.onTokenDownload;
		wgDenyFLP.rq.open( "GET", uri, true );
		wgDenyFLP.rq.send( "" );
	},

	'onTokenDownload' : function() {
		if( this.readyState != 4 ) return;
		if( this.status != 200 ) return;

		result = eval('('+this.responseText+')');
		wgDenyFLP.edittoken = result.query.tokens.csrftoken;
		if( !wgDenyFLP.edittoken ) {
			alert( '?????????????? ?????????? – ?? ???? ???????? ?????!' );
			sendError('?? ???? ???????? ?????');
			return;
		} else {
			alert('????? ???????...');
		}

		var uri = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/api.php?format=json&action=edit&title=' + encodeURIComponent( mw.config.get('wgPageName') );
		var rq = "summary=" + encodeURIComponent( wgDenyFLP.editsummary ) +
							"&text=" + encodeURIComponent( wgDenyFLP.newtext ) +
							"&token=" + encodeURIComponent( wgDenyFLP.edittoken );

		wgDenyFLP.rq.onreadystatechange = wgDenyFLP.onEditSaved;
		wgDenyFLP.rq.open( "POST", uri, true );
		wgDenyFLP.rq.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded' );
		wgDenyFLP.rq.send( rq );
	},

	'onEditSaved' : function() {
		if( this.readyState != 4 ) return;
		if( this.status != 200 ) return;

		result = eval('('+this.responseText+')');
		if( typeof( result.error ) != 'undefined' ) {
			alert( "?? ??????? ????????? ????????: " + result.error.info );
			sendError(result.error.info + ' — ? <onEditSaved>');
			return;
		} else {
			alert('???????? ' + mw.config.get('wgPageName') + ' ?????????...');
		}

		var uri = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/api.php?format=json&action=edit&title=' + encodeURIComponent( '??????????' + (wgDenyFLP.isPortal ? ' ???????' : '') + ':' + mw.config.get('wgPageName') );
		var rq = "summary=" + encodeURIComponent( wgDenyFLP.editsummary ) +
							"&prependtext=" + encodeURIComponent( wgDenyFLP.talktext ) +
							"&token=" + encodeURIComponent( wgDenyFLP.edittoken );

		wgDenyFLP.rq.onreadystatechange = wgDenyFLP.onNominationSaved;
		wgDenyFLP.rq.open( "POST", uri, true );
		wgDenyFLP.rq.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded' );
		wgDenyFLP.rq.send( rq );
	},

	'onNominationSaved' : function() {
		if( this.readyState != 4 ) return;
		if( this.status != 200 ) return;

		result = eval('('+this.responseText+')');
		if( typeof( result.error ) != 'undefined' ) {
			alert( "?? ??????? ????????? ????????: " + result.error.info );
			sendError(result.error.info + ' — ? <onNominationSaved>');
			return;
		} else {
			alert('???????? ?????????? ???????? ' + mw.config.get('wgPageName') + ' ?????????...');
		}

		var uri = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/api.php?format=json&action=query&prop=revisions&rvprop=content&rvlimit=1&titles=' +
							encodeURIComponent( '?????????:?????????_?_?????????_??????_?_???????' );
		wgDenyFLP.rq.onreadystatechange = wgDenyFLP.onLogDownload;
		wgDenyFLP.rq.open( "GET", uri, true );
		wgDenyFLP.rq.send( "" );
	},

	'onLogDownload' : function() {
		if( this.readyState != 4 ) return;
		if( this.status != 200 ) return;

		result = eval('('+this.responseText+')');
		var pgtext = ch(result.query.pages).revisions[0]['*'];
		var nominationRegex = "\\|-(?: {0,})\\n(?:\\|(?: {0,})(?:rowspan=\"?(?:\\d+)\"?(?: {0,})\\|(?: {0,}))?\\[{2}(?:?????????|??):????????? ? ????????? ?????? ? ???????\\/" + wgDenyFLP.date + "\\|\\d{1,2} [?-?]+\\]{2}(?: {0,})\\n)?\\|(?: {0,})\\[{2}" + replTitle(true) + "\\]{2}(?: {0,})\\n\\|(?: {0,})(?:.*)(?: {0,})\\n\\|(?: {0,})(.*)(?: {0,})";
		
		if (!pgtext.match(nominationRegex)) {
			alert('?????????????? ??????????: ?? ??????? ????????????? ?????? ? ?????? <?????????:????????? ? ????????? ?????? ? ???????>');
			sendError('?? ??????? ????????????? ?????? ? ?????? [[?????????:????????? ? ????????? ?????? ? ???????]]');
			return;
		}
		var match = pgtext.match( nominationRegex );
	
		var allText = match[0];
		var endText = match[1];
		
		var text = allText.replace( '|-', '|- class="shadow"');
		text = text.replace( endText, ( wgDenyFLP.isPortal ? "??????" : "??????" ) + ' ????????? ?? ?????????' );
			
		wgDenyFLP.newtext = pgtext.replace( allText, text);
		wgDenyFLP.editsummary = ( wgDenyFLP.isPortal ? "??????" : "??????" ) + " [[" + replTitle() + "]] ????????? ?? ????????? [[??:???]] " + wgMakeFLP.summarySuffix;
	
		var uri = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/api.php?format=json&action=edit&title=' +
							encodeURIComponent( '?????????:?????????_?_?????????_??????_?_???????' );
		var rq = "summary=" + encodeURIComponent( wgDenyFLP.editsummary ) +
							"&text=" + encodeURIComponent( wgDenyFLP.newtext ) +
							"&token=" + encodeURIComponent( wgDenyFLP.edittoken );

		wgDenyFLP.rq.onreadystatechange = wgDenyFLP.onLogSaved;
		wgDenyFLP.rq.open( "POST", uri, true );
		wgDenyFLP.rq.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded' );
		wgDenyFLP.rq.send( rq );
	},

	'onLogSaved' : function() {
		if( this.readyState != 4 ) return;
		if( this.status != 200 ) return;

		result = eval('('+this.responseText+')');
		if( typeof( result.error ) != 'undefined' ) {
			alert( "?? ??????? ????????? ????????: " + result.error.info );
			sendError(result.error.info + ' — ? <onLogSaved>');
			return;
		} 

	var now = new Date();
	nowYear = now.getFullYear();
	nowMonth = now.getMonth();
	
	var uri = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/api.php?format=json&action=query&prop=revisions&rvprop=content&rvlimit=1&titles=' +
							encodeURIComponent( '?????????:?????????_?_?????????_??????_?_???????/?????/' + wgDenyFLP.months[nowMonth] + '_' + nowYear );   
		wgDenyFLP.rq.onreadystatechange = wgDenyFLP.arxivDownload;
		wgDenyFLP.rq.open( "GET", uri, true );
		wgDenyFLP.rq.send( "" );
	},

	'arxivDownload' : function() {
		if( this.readyState != 4 ) return;
		if( this.status != 200 ) return;

		result = eval('('+this.responseText+')');
		var pgtext = ch(result.query.pages).revisions[0]['*'];
		
	var date = wgDenyFLP.date.split('-');
	var nominationDate = date[2] + ' ' + wgDenyFLP.months_to[date[1] - 1];
		var today = '{{' + 'subst:CURRENTDAY}} {{' + 'subst:CURRENTMONTHNAMEGEN}} {{' + 'subst:CURRENTYEAR}}';  
		var reText = '|- style="background-color:silver;"\n| [[?????????:????????? ? ????????? ?????? ? ???????/' + wgDenyFLP.date + '|' + nominationDate + ']]\n| [[' + replTitle() + ']]\n| ' + (wgDenyFLP.isPortal ? '??????': '??????') + ' ????????? ?? ????????? ' + today + ' ????\n|}';
	
	wgDenyFLP.newtext = pgtext.replace( '|}', reText);
		wgDenyFLP.editsummary = (wgDenyFLP.isPortal ? "??????": "??????") + " [[" + replTitle() + "]] ????????? ?? ????????? [[??:???]] " + wgMakeFLP.summarySuffix;
	
		var uri = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/api.php?format=json&action=edit&title=' +
							encodeURIComponent( '?????????:?????????_?_?????????_??????_?_???????/?????/' + wgDenyFLP.months[nowMonth] + '_' + nowYear );
		var rq = "summary=" + encodeURIComponent( wgDenyFLP.editsummary ) +
							"&text=" + encodeURIComponent( wgDenyFLP.newtext ) +
							"&token=" + encodeURIComponent( wgDenyFLP.edittoken );

		wgDenyFLP.rq.onreadystatechange = wgDenyFLP.onArxivDownload;
		wgDenyFLP.rq.open( "POST", uri, true );
		wgDenyFLP.rq.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded' );
		wgDenyFLP.rq.send( rq );  
	},

	'onArxivDownload' : function() {
		if( this.readyState != 4 ) return;
		if( this.status != 200 ) return;

		result = eval('('+this.responseText+')');
		if( typeof( result.error ) != 'undefined' ) {
			alert( "?? ??????? ????????? ????????: " + result.error.info );
			sendError(result.error.info + ' — ? <onArxivDownload>');
			return;
		}

	mw.notify( '???????? ??????? ????????? ?? ?????????. <a href="javascript:location.reload()">????????????? ????????</a>' );
	},

	'deny' : function() {
		var uri = mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/api.php?format=json&action=query&prop=revisions&rvprop=content&rvlimit=1&titles=' + encodeURIComponent( mw.config.get('wgPageName') );
		this.rq = new XMLHttpRequest();
		this.rq.onreadystatechange = this.onTextDownload;
		this.rq.open( "GET", uri, true );
		this.rq.send( "" );
	}
} 

if ( isOfficer() ) {
	$( wgMakeFLP.addMakeFeaturedTab );
	$( wgDenyFLP.addDenyTab );
}

/* </nowiki> */
???????? —


Warning: Undefined array key "page_added_dt" in /home/wiki/wafarin.com/pages/page_article.php on line 267

Warning: Undefined array key "preview" in /home/wiki/wafarin.com/pages/page_article.php on line 287

Warning: Undefined array key "page_added_dt" in /home/wiki/wafarin.com/pages/page_article.php on line 267

Warning: Undefined array key "preview" in /home/wiki/wafarin.com/pages/page_article.php on line 287

Same as Gadget-featuredlists.js