PageSourceSearch

https://crescina-russia.com/bitrix/templates/aspro-premier/js/autoload/tabs-history.js

js crescina-russia.com collected 2026-10-04 23:34:53 UTC 1,835 bytes, 69 lines download raw bytes

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

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.