PageSourceSearch

https://sdk.lu/wp-content/themes/sdk_site/assets/js/mediateque-clicks.js?ver=1.0.0

js sdk.lu collected 2026-10-02 05:54:57 UTC 1,085 bytes, 32 lines download raw bytes

1jQuery(function ($) {
2
3  function sendClick(postId) {
4    if (!postId || !SDK_MEDIATEQUE || !SDK_MEDIATEQUE.ajaxurl) return;
5
6    const data = new URLSearchParams();
7    data.append('action', 'mediateque_click');
8    data.append('post_id', postId);
9    data.append('nonce', SDK_MEDIATEQUE.nonce);
10
11    // sendBeacon максимально надежен для случаев, когда сразу уходим по ссылке / скачиваем файл
12    if (navigator.sendBeacon) {
13      const blob = new Blob([data.toString()], { type: 'application/x-www-form-urlencoded; charset=UTF-8' });
14      navigator.sendBeacon(SDK_MEDIATEQUE.ajaxurl, blob);
15      return;
16    }
17
18    // fallback
19    fetch(SDK_MEDIATEQUE.ajaxurl, {
20      method: 'POST',
21      headers: { 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8' },
22      body: data.toString(),
23      keepalive: true
24    }).catch(() => {});
25  }
26
27  $(document).on('click', '.mediateque-list__item-button', function () {
28    const postId = $(this).data('post-id');
29    if (postId) sendClick(postId);
30  });
31
32});

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.