<commit_before>import $ from 'jquery';
import sammy from 'sammy';

import homeController from './controllers/homeController.js';
import categoriesController from './controllers/categoriesController.js';
import libraryController from './controllers/libraryController.js';
import searchController from './controllers/searchController.js';
import contactController from './controllers/contactController.js';
import loginController from './controllers/loginController.js';
import signupController from './controllers/signupController.js';

export function init($element) {
	var app = sammy('#content', function () {
		this.before({}, function () {
			$('#content').html('');
		});

		this.get('#/', function () {
			homeController.load();
		});

		this.get('#/home', function () {
            homeController.load();
		});

		this.get('#/categories', function () {
			categoriesController.load();
		});

		this.get('#/categories/:categoryName', function () {
			var category = this.params['categoryName'];
            categoriesController.load(category);
		});

		this.get('#/library', function () {
			libraryController.load()
		});

		this.get('#/library/:bookId', function () {
			var bookId = this.params['bookId'];
			libraryController.load(bookId)
		});

		this.get('#/search', function () {
            searchController.load()
		});

		this.get('#/search/:string', function () {
			var searchString = this.params['string'];
            searchController.load(searchString);
		});

		this.get('#/contact', function () {
			contactController.load()
		});

		this.get('#/login', function () {
			loginController.load()
		});

		this.get('#/signup', function () {
			signupController.load()
		});
	});<commit_msg>Minor changes<commit_after>import $ from 'jquery';
import sammy from 'sammy';

import homeController from './controllers/homeController.js';
import categoriesController from './controllers/categoriesController.js';
import libraryController from './controllers/libraryController.js';
import searchController from './controllers/searchController.js';
import contactController from './controllers/contactController.js';
import loginController from './controllers/loginController.js';
import signupController from './controllers/signupController.js';

export function init($element) {
	var app = sammy('#content', function () {
		this.before({}, function () {
			$('#content').html('');
		});

		this.get('#/', function () {
			homeController.load();
		});

		this.get('#/home', function () {
			homeController.load();
		});

		this.get('#/categories', function () {
			categoriesController.load();
		});

		this.get('#/categories/:categoryName', function () {
			var category = this.params['categoryName'];
			categoriesController.load(category);
		});

		this.get('#/library', function () {
			libraryController.load()
		});

		this.get('#/library/:bookId', function () {
			var bookId = this.params['bookId'];
			libraryController.load(bookId)
		});

		this.get('#/search', function () {
			searchController.load()
		});

		this.get('#/search/:string', function () {
			var searchString = this.params['string'];
			searchController.load(searchString);
		});

		this.get('#/contact', function () {
			contactController.load()
		});

		this.get('#/login', function () {
			loginController.load()
		});

		this.get('#/signup', function () {
			signupController.load()
		});
	});
{'fraction_non_alphanumeric': 0.18085106382978725, 'fraction_numerical': 0.0, 'mean_word_length': 4.175840978593272, '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': '383660', 'n_tokens_mistral': 1057, 'n_tokens_neox': 942, 'n_words': 175}