MOON
Server: Apache
System: Linux vps.erhabenn.com.br 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User: machen (1008)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: /disk001/machen/www/support/wp-content/plugins/echo-knowledge-base/js/public-the-content.js
'use strict';
jQuery(document).ready(function($) {

	// get all article copies
	let $articles_counter_class = $('.eckb-article-page-content-counter');

	// check if we have issue
	if ( $articles_counter_class.length < 2 ) {
		return;
	}

	// prevent infinite loop
	if ( typeof window.epkb_the_content_fix !== 'undefined' ) {
		return;
	}

	window.epkb_the_content_fix = 1;

	$.ajax({
		type: 'POST',
		dataType: 'json',
		data: {
			action: 'epkb_update_the_content_flag',
			_wpnonce_epkb_ajax_action: epkb_the_content_i18n.nonce,
			post_id: epkb_the_content_i18n.post_id
		},
		url: epkb_the_content_i18n.ajaxurl,
	}).done(function (response) {

		if (typeof response.error != 'undefined' && response.error) {
			return;
		}

		// replace content щи the body
		$.get( location.href ).success(function(data){
			document.open();
			document.write(data);
			document.close();
		});
	});

});