<commit_before>// Move to the next page

$( function() {
	mw.pageTriage.NextView = mw.pageTriage.ToolView.extend( {
		id: 'mwe-pt-next',
		icon: 'icon_skip.png', // the default icon
		title: 'Next',
		
		initialize: function( options ) {
			this.eventBus = options.eventBus;
			
			var lastSearch = JSON.parse( $.cookie( 'NewPageFeedLastSearch' ) );
			if( lastSearch instanceof Array ) {
				var position = lastSearch.indexOf( String( mw.config.get( 'wgArticleId' ) ) );
				if( position > -1 && position < lastSearch.length ) {
					// this article is in the list, and it's not at the end.
					this.nextId = lastSearch[position + 1];
				}
			}
			
			if( ! this.nextId ) {
				this.disabledIcon = true;
			}
		},
		
		click: function() {
			var page, _this = this;
			
			// find the next page.
			this.eventBus.trigger( 'showTool', this );

			apiRequest = {
				'action': 'pagetriagelist',
				'page_id': this.nextId,
				'format': 'json'
			};
			
			$.ajax( {
				type: 'post',
				url: mw.util.wikiScript( 'api' ),
				data: apiRequest,
				dataType: 'json',
				async: false,
				success: function( result ) {
					if ( result.pagetriagelist !== undefined && result.pagetriagelist.result === 'success' ) {
						page = result.pagetriagelist.pages[0];
					}
				},
				error: function( xhr ) {
					_this.disable();
				}
			} );

			if( page.title ) {
				var url = mw.util.wikiUrlencode( page.title );
				window.location.href = url;
			} else {
				this.disable();
			}
		}

	} );

} );<commit_msg>when going to the next article, don't follow redirects<commit_after>// Move to the next page

$( function() {
	mw.pageTriage.NextView = mw.pageTriage.ToolView.extend( {
		id: 'mwe-pt-next',
		icon: 'icon_skip.png', // the default icon
		title: 'Next',
		
		initialize: function( options ) {
			this.eventBus = options.eventBus;
			
			var lastSearch = JSON.parse( $.cookie( 'NewPageFeedLastSearch' ) );
			if( lastSearch instanceof Array ) {
				var position = lastSearch.indexOf( String( mw.config.get( 'wgArticleId' ) ) );
				if( position > -1 && position < lastSearch.length ) {
					// this article is in the list, and it's not at the end.
					this.nextId = lastSearch[position + 1];
				}
			}
			
			if( ! this.nextId ) {
				this.disabledIcon = true;
			}
		},
		
		click: function() {
			var page, _this = this;
			
			// find the next page.
			this.eventBus.trigger( 'showTool', this );

			apiRequest = {
				'action': 'pagetriagelist',
				'page_id': this.nextId,
				'format': 'json'
			};
			
			$.ajax( {
				type: 'post',
				url: mw.util.wikiScript( 'api' ),
				data: apiRequest,
				dataType: 'json',
				async: false,
				success: function( result ) {
					if ( result.pagetriagelist !== undefined && result.pagetriagelist.result === 'success' ) {
						page = result.pagetriagelist.pages[0];
					}
				},
				error: function( xhr ) {
					_this.disable();
				}
			} );

			if( page.title ) {
				var url = mw.util.wikiUrlencode( page.title );
				var mark = ( url.indexOf( '?' ) === -1 ) ? '?' : '&';
				window.location.href = url + mark + "redirect=no";
			} else {
				this.disable();
			}
		}

	} );

} );
{'fraction_non_alphanumeric': 0.15871501272264632, 'fraction_numerical': 0.0022264631043256997, 'mean_word_length': 2.4828349944629013, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2367263', 'n_tokens_mistral': 1389, 'n_tokens_neox': 1082, 'n_words': 250}