PageSourceSearch

https://fashionbiznes.pl/wp-content/plugins/author-box-pages-for-e…x-for-eeat-optimization-public.js?ver=1.0.3

js fashionbiznes.pl collected 2026-10-02 18:36:59 UTC 3,278 bytes, 105 lines download raw bytes

1(function ($) {
2	'use strict';
3
4	/**
5	 * Author Box Tabs Functionality
6	 */
7	function initAuthorBoxTabs() {
8		$('.eeat-author-box.eeat-has-tabs').each(function () {
9			const $authorBox = $(this);
10			const authorBoxId = $authorBox.attr('id');
11
12			// Handle tab clicks
13			$authorBox.find('.eeat-tab-button').on('click', function (e) {
14				e.preventDefault();
15
16				const $button = $(this);
17				const tabKey = $button.data('tab');
18
19				// Update active states for buttons
20				$authorBox.find('.eeat-tab-button').removeClass('active');
21				$button.addClass('active');
22
23				// Update active states for panels
24				$authorBox.find('.eeat-tab-panel').removeClass('active');
25				$authorBox.find('#' + authorBoxId + '-' + tabKey).addClass('active');
26
27				// Update ARIA attributes
28				$authorBox.find('.eeat-tab-button').attr('aria-selected', 'false');
29				$button.attr('aria-selected', 'true');
30			});
31
32			// Set initial ARIA attributes
33			$authorBox.find('.eeat-tab-button').each(function () {
34				const $button = $(this);
35				$button.attr('role', 'tab');
36				$button.attr('aria-selected', $button.hasClass('active') ? 'true' : 'false');
37			});
38
39			$authorBox.find('.eeat-tab-panel').each(function () {
40				const $panel = $(this);
41				$panel.attr('role', 'tabpanel');
42				$panel.attr('aria-hidden', $panel.hasClass('active') ? 'false' : 'true');
43			});
44		});
45	}
46
47	function initReviewGuideline() {
48		// Create popup overlay if it doesn\'t exist
49			if (!$("#eeat-popup-overlay").length) {
50				$("body").append('<div id="eeat-popup-overlay" class="eeat-popup-overlay"><div class="eeat-popup-container"><button class="eeat-popup-close"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 6L6 18M6 6l12 12"/></svg></button><div class="eeat-popup-content"></div></div></div>');
51			}
52			
53			// Handle popup triggers
54			$(document).on("click", ".eeat-popup-trigger", function(e) {
55				e.preventDefault();
56				
57				var targetId = $(this).attr("href");
58				var $content = $(targetId);
59				
60				if ($content.length) {
61					// Copy content to popup
62					$("#eeat-popup-overlay .eeat-popup-content").html($content.html());
63					// Show popup
64					$("#eeat-popup-overlay").addClass("active");
65				}
66			});
67			
68			// Close popup when clicking close button
69			$(document).on("click", "#eeat-popup-overlay .eeat-popup-close", function() {
70				$("#eeat-popup-overlay").removeClass("active");
71			});
72			
73			// Close popup when clicking overlay
74			$(document).on("click", "#eeat-popup-overlay", function(e) {
75				if (e.target === this) {
76					$(this).removeClass("active");
77				}
78			});
79			
80			// Prevent closing when clicking inside popup
81			$(document).on("click", ".eeat-popup-container", function(e) {
82				e.stopPropagation();
83			});
84			
85			// Close popup with ESC key
86			$(document).keyup(function(e) {
87				if (e.key === "Escape") {
88					$("#eeat-popup-overlay").removeClass("active");
89				}
90			});
91	}
92
93	// Initialize on document ready
94	$(document).ready(function () {
95		initAuthorBoxTabs();
96
97		initReviewGuideline(); 
98	});
99
100	// Reinitialize after AJAX calls (compatibility)
101	$(document).on('ajaxComplete', function () {
102		initAuthorBoxTabs();
103	});
104
105})(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.