PageSourceSearch

https://alfa-gid.vercel.app/static/js/inject.js

js alfa-gid.vercel.app collected 2026-10-03 05:47:05 UTC 4,148 bytes, 101 lines download raw bytes

1// Yandex.Metrika — counter 109020981
vendor: 375 bytes, lines 1-7
1
2(function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
3m[i].l=1*new Date();
4for(var j=0;j<document.scripts.length;j++){if(document.scripts[j].src===r){return;}}
5k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)}
6)(window,document,'script','https://mc.yandex.ru/metrika/tag.js','ym');
7ym(
7109020981
vendor: 82 bytes, lines 7-8
7,'init',{clickmap:true,trackLinks:true,accurateTrackBounce:true,webvisor:true});
8
9// Market-Place / MPSU ads for alfa-gid.vercel.app
10// Articles only: horizontal after 1st, 5th, and 9th paragraphs, corner sticker
11(function () {
12  var MPSU_SCRIPT_SRC = 'https://statika.mpsuadv.ru/scripts/11433.js';
13
14  function isArticlePage() {
15    if (!document.body) return false;
16    if (document.body.classList.contains('home')) return false;
17    if (document.body.classList.contains('category')) return false;
18    if (document.body.classList.contains('archive')) return false;
19    return !!document.querySelector('article, .article-body');
20  }
21
22  function getArticleRoot() {
23    return document.querySelector('article') || document.querySelector('.article-body');
24  }
25
26  function isUnsafeAdParent(node, root) {
27    while (node && node !== root && node !== document.body) {
28      if (node.matches && node.matches('ol, ul, li, blockquote, table, thead, tbody, tr, td, th, figure, figcaption, aside, details, summary, pre, code')) return true;
29      if (node.matches && node.matches('.important, .note, .warning, .alert, .callout, .highlight, .tip, .info, .notice, .attention, .danger, .success, .faq, .steps, .pros-cons, .toc, .contents')) return true;
30      if (node.className && typeof node.className === 'string' && /(important|note|warning|alert|callout|highlight|tip|info|notice|attention|danger|success|faq|steps|pros-cons|toc|contents)/i.test(node.className)) return true;
31      node = node.parentElement;
32    }
33    return false;
34  }
35
36  function getSafeParagraphs(root) {
37    if (!root) return [];
38    return Array.prototype.filter.call(root.querySelectorAll('p'), function (paragraph) {
39      if (!paragraph || !paragraph.parentElement) return false;
40      if (isUnsafeAdParent(paragraph.parentElement, root)) return false;
41      return paragraph.textContent && paragraph.textContent.replace(/\s+/g, '').length >= 40;
42    });
43  }
44
45  function loadMpsuScript() {
46    if (document.querySelector('script[src="' + MPSU_SCRIPT_SRC + '"]')) return;
47    var script = document.createElement('script');
48    script.async = true;
49    script.src = MPSU_SCRIPT_SRC;
50    document.head.appendChild(script);
51  }
52
53  function startWidget(widgetId) {
54    window.mpsuStart = window.mpsuStart || [];
55    window.mpsuStart.push(widgetId);
56  }
57
58  function createWidget(widgetId) {
59    if (document.getElementById('mp_custom_' + widgetId)) return null;
60    var block = document.createElement('div');
61    block.id = 'mp_custom_' + widgetId;
62    return block;
63  }
64
65  function insertAfterParagraph(widgetId, paragraphNumber) {
66    var paragraphs = getSafeParagraphs(getArticleRoot());
67    var target = paragraphs[paragraphNumber - 1];
68    if (!target || !target.parentNode) return;
69    var block = createWidget(widgetId);
70    if (!block) return;
71    target.parentNode.insertBefore(block, target.nextSibling);
72    startWidget(widgetId);
73  }
74
75  function insertFloatingWidget(widgetId) {
76    var block = createWidget(widgetId);
77    if (!block) return;
78    document.body.appendChild(block);
79    startWidget(widgetId);
80  }
81
82  // Rotator Recom V alfa-gid.vercel.app corner sticker #41883
83
84  function initMpsuAds() {
85    if (!isArticlePage()) return;
86    loadMpsuScript();
87    // Rotator Static ZBT alfa-gid.vercel.app horizontal 1 #41879
88    insertAfterParagraph(41879, 1);
89    // Rotator Static ZBT alfa-gid.vercel.app horizontal 2 #41880
90    insertAfterParagraph(41880, 5);
91    // Rotator Static ZBT alfa-gid.vercel.app horizontal 3 #41882
92    insertAfterParagraph(41882, 9);
93    insertFloatingWidget(41883);
94  }
95
96  if (document.readyState === 'loading') {
97    document.addEventListener('DOMContentLoaded', initMpsuAds);
98  } else {
99    initMpsuAds();
100  }
101})();

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.