<commit_before>import * as pathUtils from '../utils/path'
import * as services from '../services'
import {RootPage} from './root'
import {RegisteredAction, ExecuteOnLoad} from '../utils/actionDecorators'

export class GalleryPage extends RootPage {
	public get imageCountInPage(): number {
		return this.jQuery('li.image-item').length;
	}
	public get imageCountTotal(): number {
		return pathUtils.getResultFromBadge(this.jQuery('span.count-badge').text());
	}

	public goToLastPage():void {
		let finalPage = Math.ceil(1.0 * this.imageCountTotal / this.imageCountInPage);
		// This takes advantage of the property that &p=2&p=3 will direct to page 3.
		unsafeWindow.location.href = `${unsafeWindow.location.href}&p=${finalPage}`;
	}
}<commit_msg>removed a reference to unsafeWindow<commit_after>import * as pathUtils from '../utils/path'
import * as services from '../services'
import {RootPage} from './root'
import {RegisteredAction, ExecuteOnLoad} from '../utils/actionDecorators'

export class GalleryPage extends RootPage {
	public get imageCountInPage(): number {
		return this.jQuery('li.image-item').length;
	}
	public get imageCountTotal(): number {
		return pathUtils.getResultFromBadge(this.jQuery('span.count-badge').text());
	}

	public goToLastPage():void {
		let finalPage = Math.ceil(1.0 * this.imageCountTotal / this.imageCountInPage);
		// This takes advantage of the property that &p=2&p=3 will direct to page 3.
		window.location.href = `${window.location.href}&p=${finalPage}`;
	}
}
{'fraction_non_alphanumeric': 0.13829787234042554, 'fraction_numerical': 0.006648936170212766, 'mean_word_length': 4.948616600790514, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2090137', 'n_tokens_mistral': 470, 'n_tokens_neox': 457, 'n_words': 120}