<commit_before>// File: app/inc/js/search.js
// Desc: ajaxy search

'use strict';

var search = {
	element: document.querySelector( '#search' ),

    toggle: function() {
        if( this.element.style.getPropertyValue( 'display' ) == 'block' ) {
        	this.element.css( { display: 'none' } );
        } else {
        	this.element.css( { display: 'block' } );
        }
    }
};


//bind
document.querySelector( '#header form.search' ).addEventListener( 'submit', function( ev ) {
    ev.preventDefault();
    search.toggle();
});<commit_msg>Update search for util.js<commit_after>// File: app/inc/js/search.js
// Desc: ajaxy search

'use strict';

var search = {
	element: util.element( '#search' ),

    toggle: function() {
        if( this.element.style.getPropertyValue( 'display' ) == 'block' ) {
        	this.element.css( { display: 'none' } );
        } else {
        	this.element.css( { display: 'block' } );
        }
    }
};


//bind
document.querySelector( '#header form.search' ).addEventListener( 'submit', function( ev ) {
    ev.preventDefault();
    search.toggle();
});
{'fraction_non_alphanumeric': 0.17974452554744524, 'fraction_numerical': 0.0, 'mean_word_length': 2.7186440677966104, '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': '7016769', 'n_tokens_mistral': 348, 'n_tokens_neox': 350, 'n_words': 75}