<commit_before>/**
 * Functionality specific to Twenty Thirteen.
 *
 * Provides helper functions to enhance the theme experience.
 */

( function( $ ) {
	var body    = $( 'body' ),
	    _window = $( window );

	/**
	 * Enables menu toggle for small screens.
	 */
	( function() {
		var nav = $( '.main-navigation' ), menuButton,searchButton, menu, searchArea;
		if ( ! nav ) {
			return;
		}
		var topbar = $('.header .topbar')
		menuButton = topbar.find( '.icon-bars' );
		if ( ! menuButton ) {
			return;
		}
		searchButton = topbar.find( '.icon-search' );
		if ( ! searchButton ) {
			return;
		}

		// Hide button if menu is missing or empty.
		menu = nav.find( '.nav-menu' );
		if ( ! menu || ! menu.children().length ) {
			button.hide();
			return;
		}
		searchArea = topbar.find('.search-form');

		menuButton.on( 'click.eastBlue', function() {
			nav.toggleClass( 'toggled-on' );
		} );
		searchButton.on( 'click.eastBlue', function() {
			topbar.toggleClass( 'toggled-search' );
		} );
	} )();

	/**
	 * Makes "skip to content" link work correctly in IE9 and Chrome for better
	 * accessibility.
	 *
	 * @link http://www.nczonline.net/blog/2013/01/15/fixing-skip-to-content-links/
	 */
	_window.on( 'hashchange.eastBlue', function() {
		var element = document.getElementById( location.hash.substring( 1 ) );

		if ( element ) {
			if ( ! /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) {
				element.tabIndex = -1;
			}

			element.focus();
		}
	} );

	/**
	 * Arranges footer widgets vertically.
	 */
	// if ( $.isFunction( $.fn.masonry ) ) {
	// 	var columnWidth = body.is( '.sidebar' ) ? 228 : 245;

	// 	$( '#secondary .widget-area' ).masonry( {
	// 		itemSelector: '.widget',
	// 		columnWidth: columnWidth,
	// 		gutterWidth: 20,
	// 		isRTL: body.is( '.rtl' )
	// 	} );
	// }

	(function () {
		var topBtn=$(".backToTop");
		topBtn.hide();
		$(window).scroll(function(){
			if ($(window).scrollTop()>400){
				topBtn.fadeIn(500);
			}
			else
			{
				topBtn.fadeOut(500);
			}
		});
		topBtn.click(function(){
			$('body,html').animate({scrollTop:0},500);
		return false;
		});
	});
} )( jQuery );<commit_msg>back to top<commit_after>/**
 * Functionality specific to Twenty Thirteen.
 *
 * Provides helper functions to enhance the theme experience.
 */

( function( $ ) {
	var body    = $( 'body' ),
	    _window = $( window );

	/**
	 * Enables menu toggle for small screens.
	 */
	( function() {
		var nav = $( '.main-navigation' ), menuButton,searchButton, menu, searchArea;
		if ( ! nav ) {
			return;
		}
		var topbar = $('.header .topbar')
		menuButton = topbar.find( '.icon-bars' );
		if ( ! menuButton ) {
			return;
		}
		searchButton = topbar.find( '.icon-search' );
		if ( ! searchButton ) {
			return;
		}

		// Hide button if menu is missing or empty.
		menu = nav.find( '.nav-menu' );
		if ( ! menu || ! menu.children().length ) {
			button.hide();
			return;
		}
		searchArea = topbar.find('.search-form');

		menuButton.on( 'click.eastBlue', function() {
			nav.toggleClass( 'toggled-on' );
		} );
		searchButton.on( 'click.eastBlue', function() {
			topbar.toggleClass( 'toggled-search' );
		} );
	} )();

	_window.on( 'hashchange.eastBlue', function() {
		var element = document.getElementById( location.hash.substring( 1 ) );

		if ( element ) {
			if ( ! /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) {
				element.tabIndex = -1;
			}

			element.focus();
		}
	} );


	(function () {
		var topBtn=jQuery(".backToTop");
		topBtn.hide();
		jQuery(window).scroll(function(){
			if (jQuery(window).scrollTop()>400){
				topBtn.fadeIn(500);
			}
			else
			{
				topBtn.fadeOut(500);
			}
		});
		topBtn.click(function(){
			jQuery('body,html').animate({scrollTop:0},500);
		return false;
		});
	});
} )( jQuery );
{'fraction_non_alphanumeric': 0.19133192389006343, 'fraction_numerical': 0.012420718816067653, 'mean_word_length': 2.8622448979591835, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, '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': '4069110', 'n_tokens_mistral': 1550, 'n_tokens_neox': 1327, 'n_words': 265}