PageSourceSearch

https://semena62.ru/bitrix/templates/aspro-premier/js/autoload/tabs-history.js

js semena62.ru collected 2026-10-05 00:06:38 UTC 1,664 bytes, 52 lines download raw bytes

1var newHash = location.hash;
2if ("onhashchange" in window) {
3  $(window).bind("hashchange", function () {
4    var newHash = location.hash;
5
6    if (newHash) {
7      if ("scrollRestoration" in history) {
8        history.scrollRestoration = "manual";
9      }
10
11      if ($('.tabs.tabs-history .nav li:not(.hidden) a[href="' + newHash + '"]').length) {
12        $('.tabs.tabs-history .nav a[href="' + newHash + '"]').trigger("click");
13
14        var $block = $(newHash);
15        if ($block.length) {
16          if ($block.closest(".tab-pane").length) {
17            var offset = -206;
18            if (typeof arAsproOptions !== "undefined") {
19              offset = window.matchMedia("(max-width:991px)").matches
20                ? arAsproOptions.THEME.HEADER_MOBILE_FIXED !== "Y" ||
21                  arAsproOptions.THEME.HEADER_MOBILE_SHOW !== "ALWAYS"
22                  ? -187 + 62
23                  : -187
24                : arAsproOptions.THEME.TOP_MENU_FIXED !== "Y"
25                ? -206 + 81
26                : -206;
27            }
28
29            $block.data("offset", offset);
30          }
31
32          scrollToBlock(newHash);
33        } else {
34          if ($(".ordered-block .tabs").length) {
35            var content_offset = $(".ordered-block .tabs").offset();
36            $("html, body").animate({ scrollTop: content_offset.top - 90 }, 400);
37          }
38        }
39      } else {
40        scrollToBlock(newHash);
41      }
42    }
43  });
44}
45
46$(document).on("click", ".tabs.tabs-history a[data-toggle=tab]", function (e) {
47  var $this = $(e.target);
48
49  if (typeof history !== "undefined" && $this.attr("href")) {
50    history.replaceState(null, null, $this.attr("href"));
51  }
52});

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.