PageSourceSearch

https://tss-sklad.ru/bitrix/templates/aspro_max/js/smartPositionDropdown.js?1739434467703

js tss-sklad.ru collected 2026-10-07 21:35:23 UTC 703 bytes, 23 lines download raw bytes

1
2document.addEventListener("DOMContentLoaded", function(){
3  const $combinedNodes = document.querySelectorAll('.menu_top_block .menu > li.v_hover.m_combined');
4
5  [].forEach.call($combinedNodes, function($combinedNode) {
6    positionDropdown($combinedNode);
7  });
8});
9
10$(document).on('mouseenter', '.menu_top_block .menu > li.v_hover.m_combined',  e => positionDropdown(e.currentTarget));
11
12function positionDropdown($element) {
13  const $dropdown = $element.querySelector('.dropdown');
14
15  if($dropdown) {
16    let scrollHeight = document.body.offsetHeight;
17
18    if(scrollHeight - BX.pos($dropdown).bottom < 0) {
19      $element.classList.add('m_top');
20      $element.classList.remove('m_line')
21    }
22  }
23}

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.