$( document ).ready( () => {
	"use strict";
	if ( mw.config.get( "wgNamespaceNumber" ) == 829 ) {
		// get all results tables
		const ALL_RESULTS = Array.from( document.querySelectorAll( ".wikitable.unit-tests-result" ) );
		if ( ALL_RESULTS.length ) {
			console.log( "ALL_RESULTS: ", ALL_RESULTS );
			// get contiguous blocks of result tables
			const BLOCKS = ;
			ALL_RESULTS.forEach( ( table, i ) => {
				if ( !~ALL_RESULTS.indexOf( table.nextElementSibling ) ) {
					BLOCKS.push(  );
				}
			} );
			console.log( "BLOCKS: ", BLOCKS );
			BLOCKS.forEach( block => {
				block.forEach( result => {
					if ( result.querySelector( 'img:not()' ) ) {
						block.before( result );
					}
				} );
			} );
		}
	}
} );