PageSourceSearch

https://www.joedolson.com/wp-content/themes/joe/js/general.js?ver=260621-190729

js joedolson.com collected 2026-10-02 02:25:35 UTC 1,603 bytes, 50 lines download raw bytes

1(function( $ ) { 'use strict';
2	// remove target attribute from links
3	$('a').removeAttr('target');
4
5	// add target attribute when rel=external
6	// @why There are reasons for links to open in a new tab; this requires a higher knowledge barrier to do it.
7	$('a[rel=external]').attr( 'target', '_blank' );
8
9	// make dropdowns functional on focus
10	$( '#primary-menu' ).find( 'a' ).on( 'focus blur', function() {
11		$( this ).parents( 'ul, li' ).toggleClass( 'focus' );
12	} );
13
14	$( '.affwp-affiliate-dashboard-tab.active a' ).attr( 'aria-current', 'page' );
15	
16	$( '#edd_sl_license_add_site_form span' ).wrap( '<label for="add_site_url"></label>' ).text( 'Activate a new site URL' );
17	$( '#edd_sl_license_add_site_form .edd-input' ).attr( 'id', 'add_site_url' ).attr( 'type', 'url' );
18
19	// menu toggle
20	var width = $( window ).width();
21	if ( width <= 990 ) {
22		$( '#primary-menu nav ul').hide();
23	}
24
25	$( window ).resize(function() {
26		var menu = $( '#primary-menu' );
27		if ( ! menu.hasClass( 'toggled' ) ) {
28			if ( $(this).width() != width ) {
29				var width = $( this ).width();
30				if ( width <= 990 ) {
31					$( '#primary-menu nav ul').hide();
32				} else {
33					$( '#primary-menu nav ul').show();
34				}
35			}
36		}
37	});
38
39	$( '.menu-toggle' ).on( 'click', function() {
40		$( '#primary-menu nav ul' ).toggle();
41		var expanded = $(this).attr( 'aria-expanded' );
42		if ( expanded == 'false' ) {
43			$( '#primary-menu' ).addClass( 'toggled' );
44			$( this ).attr( 'aria-expanded', 'true' );
45		} else {
46			$( '#primary-menu' ).removeClass( 'toggled' );
47			$( this ).attr( 'aria-expanded', 'false' );
48		}
49	} );
50}(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.