PageSourceSearch

https://mesoestetic.bg/wp-content/plugins/woocommerce-products-filter/ext/by_author/js/by_author.js?ver=1.4.5

js mesoestetic.bg collected 2026-09-24 13:55:50 UTC 2,328 bytes, 94 lines download raw bytes

1"use strict";
2
3function woof_init_author() {
4	if (icheck_skin != 'none') {
5
6		jQuery( '.woof_checkbox_author' ).iCheck( 'destroy' );
7
8		let icheck_selector = '.woof_checkbox_author';
9		let skin            = jQuery( icheck_selector ).parents( '.woof_redraw_zone' ).eq( 0 ).data( 'icheck-skin' );
10		if (skin) {
11			skin = skin.split( '_' );
12			jQuery( icheck_selector ).iCheck(
13				{
14					checkboxClass: 'icheckbox_' + skin[0] + '-' + skin[1]
15				}
16			);
17		} else {
18			jQuery( icheck_selector ).iCheck(
19				{
20					checkboxClass: 'icheckbox_' + icheck_skin.skin + '-' + icheck_skin.color
21				}
22			);
23		}
24
25		// +++
26
27		jQuery( '.woof_checkbox_author' ).on(
28			'ifChecked',
29			function (event) {
30				jQuery( this ).attr( "checked", true );
31
32				woof_current_values.woof_author = get_current_checked( this );
33				woof_ajax_page_num              = 1;
34				if (woof_autosubmit) {
35					woof_submit_link( woof_get_submit_link() );
36				}
37			}
38		);
39
40		jQuery( '.woof_checkbox_author' ).on(
41			'ifUnchecked',
42			function (event) {
43				jQuery( this ).attr( "checked", false );
44				jQuery( this ).removeAttr( "checked" );
45
46				woof_current_values.woof_author = get_current_checked( this );
47				woof_ajax_page_num              = 1;
48				if (woof_autosubmit) {
49					woof_submit_link( woof_get_submit_link() );
50				}
51			}
52		);
53
54	} else {
55		jQuery( '.woof_checkbox_author' ).on(
56			'change',
57			function (event) {
58
59				if (jQuery( this ).is( ':checked' )) {
60					jQuery( this ).attr( "checked", true );
61					woof_current_values.woof_author = get_current_checked( this );
62					woof_ajax_page_num              = 1;
63					if (woof_autosubmit) {
64						woof_submit_link( woof_get_submit_link() );
65					}
66				} else {
67					jQuery( this ).attr( "checked", false );
68					woof_current_values.woof_author = get_current_checked( this );
69					woof_ajax_page_num              = 1;
70					if (woof_autosubmit) {
71						woof_submit_link( woof_get_submit_link() );
72					}
73				}
74			}
75		);
76	}
77
78	function get_current_checked(_this) {
79		var values = [];
80		jQuery( _this ).parents( '.woof_authors' ).find( '.woof_checkbox_author' ).each(
81			function (i, el) {
82				if (jQuery( this ).attr( "checked" ) == 'checked') {
83					values.push( jQuery( this ).val() );
84
85				}
86
87			}
88		);
89
90		values = values.filter( (v, i, a) => a.indexOf( v ) === i );
91		return values.join( ',' );
92	}
93
94}

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.