<commit_before>define(['jquery', 'inheritance', 'ajaxify', 'domReady!'], function($, inheritance, ajaxify) {

    var instance = null;

    var Search = Class.extend({
        init: function () {
            if (instance !== null) {
                throw Error('Only one instance of Search allowed!');
            }

            if ($('.search-query').length == 0) {
                return;
            }

            var that = this;

            $('#main').bind('ajaxifyInit', function (event) {
                that.internalInit();
            });

            that.internalInit();
        },
        internalInit: function () {
            var query = $("#search").data("query");

            $('.search-query').bind('keyup', function (event) {

                if (event.keyCode == 13 && $(this).val() != "") {
                    $(this).blur();<commit_msg>fix so search dun get bound multiple times on ajaxify reload...<commit_after>define(['jquery', 'inheritance', 'ajaxify', 'domReady!'], function($, inheritance, ajaxify) {

    var instance = null;

    var Search = Class.extend({
        init: function () {
            if (instance !== null) {
                throw Error('Only one instance of Search allowed!');
            }

            if ($('.search-query').length == 0) {
                return;
            }

            var that = this;

            $('#main').on('ajaxifyInit', function (event) {
                that.internalInit();
            });

            that.internalInit();
        },
        internalInit: function () {
            var query = $("#search").data("query");

            $('.search-query')
                .off('keyup.search-query')
                .on('keyup.search-query', function (event) {
                if (event.keyCode == 13 && $(this).val() != "") {
                    $(this).blur();
{'fraction_non_alphanumeric': 0.1681127982646421, 'fraction_numerical': 0.0032537960954446853, 'mean_word_length': 1.584033613445378, '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': '4497231', 'n_tokens_mistral': 493, 'n_tokens_neox': 453, 'n_words': 111}