PageSourceSearch

https://newsguild.org/wp-content/themes/maishawp/js/search.js?ver=1.0

js newsguild.org collected 2026-10-02 06:00:50 UTC 677 bytes, 28 lines download raw bytes

1/**
2 * Theme functions file.
3 *
4 * Contains handlers for search.
5 */
6
7( function( $ ) {
8	"use strict";
9	// Search toggle.
10		$( '.search-toggle' ).on( 'click.maisha', function( event ) {
11			var that    = $( this ),
12				wrapper = $( '#search-container' ),
13				container = that.find( 'a' );
14
15			that.toggleClass( 'active' );
16			wrapper.toggleClass( 'hide' );
17
18			if ( that.hasClass( 'active' ) ) {
19				container.attr( 'aria-expanded', 'true' );
20			} else {
21				container.attr( 'aria-expanded', 'false' );
22			}
23
24			if ( that.is( '.active' ) || $( '.search-toggle .screen-reader-text' )[0] === event.target ) {
25				wrapper.find( '.search-field' ).focus();
26			}
27		} );
28} )( jQuery );

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.