<commit_before>"use strict";
/*global translator*/

var openfantasy = openfantasy || {
	templates: {
		header: null,
		footer: null
	}
};

$(document).ready(function() {
	$.get('/templates/rpg/header.tpl', function(header) {
		translator.translate(header, function(translatedHeader) {
			openfantasy.templates.header = translatedHeader;
		});
	});

	$.get('/templates/rpg/footer.tpl', function(footer) {
		translator.translate(footer, function(translatedFooter) {
			openfantasy.templates.footer = translatedFooter;
		});
	});

	$(window).on('action:ajaxify.contentLoaded', function(url) {
		var content = $('#content');

		if (!content.children('.openfantasy').length) {
			var html = openfantasy.templates.header + content.html() + openfantasy.templates.footer;
			content.html(html);
		}
	});
});<commit_msg>cash mod integration client-side<commit_after>"use strict";
/*global translator*/

var openfantasy = openfantasy || {
	templates: {
		header: null,
		footer: null
	}
};

$(document).ready(function() {
	$.get('/templates/rpg/header.tpl', function(header) {
		translator.translate(header, function(translatedHeader) {
			openfantasy.templates.header = translatedHeader;
		});
	});

	$.get('/templates/rpg/footer.tpl', function(footer) {
		translator.translate(footer, function(translatedFooter) {
			openfantasy.templates.footer = translatedFooter;
		});
	});

	$(window).on('action:ajaxify.contentLoaded', function(url) {
		var content = $('#content');

		if (!content.children('.openfantasy').length) {
			var html = openfantasy.templates.header + content.html() + openfantasy.templates.footer;
			content.html(html);
		}

		$.get('/api/cash', function(cash) {
			// this is temporary, once ADR is fully ported I'd like to go through all of these and replace with <span data-target="character.points">
			content.html(content.html().replace(/{character_points}/g, cash.points).replace(/{l_points}/g, cash.currency));
		});
	});
});
{'fraction_non_alphanumeric': 0.1725025746652935, 'fraction_numerical': 0.0, 'mean_word_length': 4.817365269461078, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '7557201', 'n_tokens_mistral': 670, 'n_tokens_neox': 602, 'n_words': 105}