1// Yandex.Metrika â counter 108865149
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(
7108865149
vendor: 83 bytes, lines 7-9
7,'init',{clickmap:true,trackLinks:true,accurateTrackBounce:true,webvisor:true}); 8 9
10// ============================================================ 11// Market-Place / MPSU ads for asia-motors-hub.vercel.app 12// Articles only: horizontal after 1st, 5th, and 9th paragraphs, corner sticker 13(function () { 14 var MPSU_SCRIPT_SRC = 'https://statika.mpsuadv.ru/scripts/11379.js'; 15 16 function isArticlePage() { 17 if (!document.body) return false; 18 if (document.body.classList.contains('home')) return false; 19 if (document.body.classList.contains('category')) return false; 20 if (document.body.classList.contains('archive')) return false; 21 return !!document.querySelector('article, .article-body'); 22 } 23 24 function getArticleRoot() { 25 return document.querySelector('article') || document.querySelector('.article-body'); 26 } 27 28 function isUnsafeAdParent(node, root) { 29 while (node && node !== root && node !== document.body) { 30 if (node.matches && node.matches('ol, ul, li, blockquote, table, thead, tbody, tr, td, th, figure, figcaption, aside, details, summary, pre, code')) return true; 31 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; 32 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; 33 node = node.parentElement; 34 } 35 return false; 36 } 37 38 function getSafeParagraphs(root) { 39 if (!root) return []; 40 return Array.prototype.filter.call(root.querySelectorAll('p'), function (paragraph) { 41 if (!paragraph || !paragraph.parentElement) return false; 42 if (isUnsafeAdParent(paragraph.parentElement, root)) return false; 43 return paragraph.textContent && paragraph.textContent.replace(/\s+/g, '').length >= 40; 44 }); 45 } 46 47 function loadMpsuScript() { 48 var existingScript = document.querySelector('script[src="' + MPSU_SCRIPT_SRC + '"]'); 49 if (existingScript) return; 50 var script = document.createElement('script'); 51 script.async = true; 52 script.src = MPSU_SCRIPT_SRC; 53 document.head.appendChild(script); 54 } 55 56 function startWidget(widgetId) { 57 window.mpsuStart = window.mpsuStart || []; 58 window.mpsuStart.push(widgetId); 59 } 60 61 function createWidget(widgetId) { 62 if (document.getElementById('mp_custom_' + widgetId)) return null; 63 var block = document.createElement('div'); 64 block.id = 'mp_custom_' + widgetId; 65 return block; 66 } 67 68 function insertAfterParagraph(widgetId, paragraphNumber) { 69 var root = getArticleRoot(); 70 if (!root) return; 71 var paragraphs = getSafeParagraphs(root); 72 var target = paragraphs[paragraphNumber - 1]; 73 if (!target || !target.parentNode) return; 74 var block = createWidget(widgetId); 75 if (!block) return; 76 target.parentNode.insertBefore(block, target.nextSibling); 77 startWidget(widgetId); 78 } 79 80 function appendFloating(widgetId) { 81 var block = createWidget(widgetId); 82 if (!block) return; 83 document.body.appendChild(block); 84 startWidget(widgetId); 85 } 86 87 function initMpsuAds() { 88 if (!isArticlePage()) return; 89 loadMpsuScript(); 90 // Rotator Static ZBT asia-motors-hub.vercel.app horizontal 1 ?40427 91 insertAfterParagraph(40427, 1); 92 // Rotator Static ZBT asia-motors-hub.vercel.app horizontal 2 ?40428 93 insertAfterParagraph(40428, 5); 94 // Rotator Static ZBT asia-motors-hub.vercel.app horizontal 3 ?40429 95 insertAfterParagraph(40429, 9); 96 // Rotator Recom V asia-motors-hub.vercel.app corner sticker ?40356 97 appendFloating(40356); 98 } 99 100 if (document.readyState === 'loading') { 101 document.addEventListener('DOMContentLoaded', initMpsuAds); 102 } else { 103 initMpsuAds(); 104 } 105})(); 106 107// ============================================================ 108 109// HOTFIX: Fix search URL generation 110// Search results incorrectly include category slug in URL: 111// /voennaya-forma/kakie-berety.html 112// Correct format is hash_dirs: 113// /articles/k/ka/kakie-berety.html 114// This observer watches search dropdowns and fixes URLs. 115// ============================================================ 116(function(){ 117 var dd = document.getElementById('globalSearchDropdown') || document.getElementById('searchDropdown'); 118 if (!dd) return; 119 new MutationObserver(function(){ 120 var links = dd.querySelectorAll('a[href]'); 121 for (var i = 0; i < links.length; i++) { 122 var a = links[i]; 123 if (a._urlFixed) continue; 124 a._urlFixed = true; 125 var href = a.getAttribute('href'); 126 if (!href) continue; 127 if (href.indexOf('/articles/') !== -1) continue; 128 var parts = href.split('/'); 129 var filename = parts[parts.length - 1]; 130 if (!filename.endsWith('.html')) continue; 131 var slug = filename.replace('.html', '').toLowerCase(); 132 var c1 = slug[0] || ''; 133 var c2 = slug.substring(0, Math.min(2, slug.length)); 134 var newUrl = '/articles/' + c1 + '/' + c2 + '/' + filename; 135 a.setAttribute('href', newUrl); 136 var slugEl = a.querySelector('.sd-slug'); 137 if (slugEl) slugEl.textContent = newUrl; 138 } 139 }).observe(dd, {childList: true, subtree: true}); 140})(); 141 142 143 144// Market-Place / MPSU sticker for asia-motors-hub.vercel.app 145(function () {
146 var MPSU_SCRIPT_SRC = 'https://statika.mpsuadv.ru/scripts/11379.js'; 147 var STICKER_WIDGET_ID = 40356; 148 149 function isArticlePage() { 150 if (!document.body) return false; 151 if (document.body.classList.contains('home')) return false; 152 if (document.body.classList.contains('category')) return false; 153 if (document.body.classList.contains('archive')) return false; 154 155 return !!document.querySelector('article, .article-body, .pb-article-body'); 156 } 157 158 function loadMpsuScript() { 159 if (document.querySelector('script[src="' + MPSU_SCRIPT_SRC + '"]')) return; 160 161 var script = document.createElement('script'); 162 script.async = true; 163 script.src = MPSU_SCRIPT_SRC; 164 document.head.appendChild(script); 165 } 166 167 function startWidget(widgetId) { 168 window.mpsuStart = window.mpsuStart || []; 169 window.mpsuStart.push(widgetId); 170 } 171 172 function insertFloatingWidget(widgetId) { 173 if (document.getElementById('mp_custom_' + widgetId)) return; 174 175 var block = document.createElement('div'); 176 block.id = 'mp_custom_' + widgetId; 177 document.body.appendChild(block); 178 startWidget(widgetId); 179 } 180 181 function initAds() { 182 if (!isArticlePage()) return; 183 184 loadMpsuScript(); 185 insertFloatingWidget(STICKER_WIDGET_ID); 186 } 187 188 if (document.readyState === 'loading') { 189 document.addEventListener('DOMContentLoaded', initAds); 190 } else { 191 initAds(); 192 } 193})();
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.