<commit_before>frappe.views.socialFactory = class socialFactory extends frappe.views.Factory {
	show() {
		this.make('Social');
	}

	make(page_name) {
		const assets = [
			'/assets/js/social.min.js'
		];

		frappe.require(assets, () => {
			frappe.social.home = new frappe.social.Home({
				parent: this.make_page(true, page_name)
			});
		});
	}
};

$(document).on('toolbar_setup', () => {<commit_msg>Avoid creation of multiple pages<commit_after>frappe.views.socialFactory = class socialFactory extends frappe.views.Factory {
	show() {
		if (frappe.pages.social) {
			frappe.container.change_to('social');
		} else {
			this.make('social');
		}
	}

	make(page_name) {
		const assets = [
			'/assets/js/social.min.js'
		];

		frappe.require(assets, () => {
			frappe.social.home = new frappe.social.Home({
				parent: this.make_page(true, page_name)
			});
		});
	}
};

$(document).on('toolbar_setup', () => {
{'fraction_non_alphanumeric': 0.18111964873765093, 'fraction_numerical': 0.0, 'mean_word_length': 3.6769230769230767, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4773059', 'n_tokens_mistral': 368, 'n_tokens_neox': 338, 'n_words': 46}