PageSourceSearch

https://www.creatio.com/themes/custom/creatio/js/elements/link-anchor.js?v=1.0.0

js creatio.com collected 2026-09-24 08:41:30 UTC 1,589 bytes, 52 lines download raw bytes

1(function ($, Drupal) {
2  'use strict';
3  /**
4   * Behavior description.
5   */
6
7  Drupal.behaviors.creatio_element_link_anchor = {
8    attach: (context, settings) => {
9      const body = $('body');
10
11      $(document).once('linkAnchorClick').on('click', '.link-anchor', (e) => {
12        const link = $(e.target).closest('.link-anchor');
13        if(typeof link.attr('href') !== 'undefined') {
14          const elem = $(link.attr('href'));
15          if(elem.length) {
16            setTimeout(() => {
17              let top = elem.offset().top - parseInt(body.css('padding-top'));
18              const header = $('.creatio-header');
19              if(header.length) {
20                if(header.css('display') !== 'none') {
21                  top -= $('.creatio-header-menu').height();
22                } else {
23                  top -= $('.creatio-mobile-header-top').height();
24                }
25              }
26
27              const wm = $('#ts-navigation');
28              if(wm.length && wm.css('display') === 'block') {
29                top -= wm.height() - 1;
30              }
31              top -= parseInt(elem.css('margin-top'));
32
33              if(elem.closest('.ts-toc-content').length) {
34                top -= parseInt(elem.closest('.ts-toc-content').css('padding-top'));
35              }
36
37              $([document.documentElement, document.body]).animate({
38                scrollTop: top
39              }, {
40                duration: 700,
41                queue: false
42              });
43            }, 50);
44          }
45        }
46
47        return false;
48      });
49    }
50  };
51
52} (jQuery, Drupal));

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.