PageSourceSearch

https://lgz.ru/local/plugins/wp-post-views/assets/js/ajax.js

js lgz.ru collected 2026-10-01 10:18:16 UTC 708 bytes, 26 lines download raw bytes

1/* global wp_post_views_ajax_object, XMLHttpRequest */
2/* eslint-disable camelcase */
3
4document.addEventListener( 'DOMContentLoaded', function () {
5	if (
6		document.body.classList.contains( 'archive' ) ||
7		document.body.classList.contains( 'blog' )
8	) {
9		// Do nothing on archive or blog.
10	} else {
11		if ( ! wp_post_views_ajax_object.post_id ) {
12			return;
13		}
14
15		const url = wp_post_views_ajax_object.ajaxurl;
16
17		const data = new FormData();
18		data.append( 'action', 'wppv_counter' );
19		data.append( 'post_id', wp_post_views_ajax_object.post_id );
20		data.append( 'nonce', wp_post_views_ajax_object.nonce );
21		const xhttp = new XMLHttpRequest();
22
23		xhttp.open( 'POST', url );
24		xhttp.send( data );
25	}
26} );

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.