# jetpack/13.5.2/3rd-party/debug-bar/debug-bar.js

Jetpack – WP Security, Backup, Speed, &amp; Growth, version 13.5.2. 23 lines.

- Page: https://pluginprobe.com/plugins/jetpack/13.5.2/code/3rd-party/debug-bar/debug-bar.js
- Raw: https://pluginprobe.com/plugins/jetpack/13.5.2/raw/3rd-party/debug-bar/debug-bar.js
- Modified: 2018-01-30T23:12:06+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/jetpack/13.5.2/code/3rd-party/debug-bar/debug-bar.js#L10-L20`.

```javascript
/* global jQuery, JSON */

( function( $ ) {
	$( document ).ready( function() {
		$( '.jetpack-search-debug-bar .json-toggle-wrap .toggle' ).click( function() {
			var t = $( this ),
				wrap = t.closest( '.json-toggle-wrap' ),
				pre = wrap.find( 'pre' ),
				content = pre.text(),
				isPretty = wrap.hasClass( 'pretty' );

			if ( ! isPretty ) {
				pre.text( JSON.stringify( JSON.parse( content ), null, 2 ) );
			} else {
				content.replace( '\t', '' ).replace( '\n', '' ).replace( ' ', '' );
				pre.text( JSON.stringify( JSON.parse( content ) ) );
			}

			wrap.toggleClass( 'pretty' );
		} );
	} );
} )( jQuery );

```
