PageSourceSearch

https://diit.cz/sites/all/themes/stkf6/js/skyscraper.js?tk0e51

js diit.cz collected 2026-10-01 11:32:24 UTC 4,248 bytes, 92 lines download raw bytes

1(function($) {
2
3  $(document).ready(function () {
4    Drupal.behaviors.openxAsyncSkyscraper = {};
5    Drupal.behaviors.openxAsyncSkyscraper.scR = $("#block-openx-async-skyscraper");
6    Drupal.behaviors.openxAsyncSkyscraper.scL = $("#block-openx-async-skyscraper-levy");
7    Drupal.behaviors.middleSkyscraper = {};
8    Drupal.behaviors.middleSkyscraper.scM = $("#block-openx-async-skyscrapersidebar");
9    Drupal.behaviors.openxAsyncSkyscraper.startingTop = 250;
10    Drupal.behaviors.middleSkyscraper.startingTop = 250;
11    var bannerTop = 20; // top after scrolling down
12    if ($('.admin-menu').size()) {
13      Drupal.behaviors.openxAsyncSkyscraper.startingTop = 270;
14      bannerTop = 40;
15    }
16//        var bottom = $("#footer").offset().top - 66;
17//        console.debug(bottom);
18
19    Drupal.behaviors.openxAsyncSkyscraper.moveOnScroll = function (banner) {
20      var htop = $(window).scrollTop();
21      var regionBottom = $('.region-bottom');
22      var bottom = regionBottom.position().top + regionBottom.height();
23      var containerTop = $('#page-header').offset();
24      //console.log(banner);
25      if (containerTop.top > Drupal.behaviors.openxAsyncSkyscraper.startingTop) {
26        Drupal.behaviors.openxAsyncSkyscraper.startingTop = containerTop.top;
27      }
28
29      if (htop > Drupal.behaviors.openxAsyncSkyscraper.startingTop - bannerTop) {
30        banner.css('position', 'fixed');
31        banner.css('top', bannerTop);
32      }
33      else {
34        banner.css('position', 'fixed');
35        banner.css('top', Drupal.behaviors.openxAsyncSkyscraper.startingTop - htop);
36      }
37      var bannerHeight = $('#skyscraper a img').height() + 30;
38      if (htop + bannerHeight + 30 > bottom) {
39       // console.debug('jes3');
40        banner.css('position', 'absolute');
41        banner.css('top', bottom - bannerHeight);
42      }
43    };
44    Drupal.behaviors.middleSkyscraper.moveOnScroll = function (banner) {
45      if ($(window).width() > 760) {
46        var htop = $(window).scrollTop();
47        var regionBottom = $('.region-bottom');
48        var bottom = regionBottom.position().top;
49        var containerTop = $('#block-views-blogs-block-1').offset();
50        let containerTopOffset = containerTop.top + $('#block-views-blogs-block-1').height();
51
52        if($('#block-openx-async-kzbk').length == 0 || $("body").hasClass("sssp")){
53          if (containerTopOffset > Drupal.behaviors.middleSkyscraper.startingTop) {
54            Drupal.behaviors.middleSkyscraper.startingTop = containerTopOffset;
55          }
56
57          if (htop > Drupal.behaviors.middleSkyscraper.startingTop - bannerTop) {
58            banner.css('position', 'fixed');
59            banner.css('top', bannerTop);
60          }
61          else {
62            banner.css('position', 'fixed');
63            banner.css('top', Drupal.behaviors.middleSkyscraper.startingTop - htop);
64          }
65          var bannerHeight = $('#block-openx-async-skyscrapersidebar').height() + 30;
66
67          if (htop + bannerHeight + 30 > bottom) {
68            //console.debug('jes2');
69            var scrollBreak = bottom - bannerHeight;
70            var tt = htop - scrollBreak
71            banner.css('position', 'fixed');
72            banner.css('top', "-" + tt + "px");
73
74          }
75        }
76      }
77    };
78
79    Drupal.behaviors.openxAsyncSkyscraper.moveOnScroll(Drupal.behaviors.openxAsyncSkyscraper.scR);
80    Drupal.behaviors.openxAsyncSkyscraper.moveOnScroll(Drupal.behaviors.openxAsyncSkyscraper.scL);
81    Drupal.behaviors.middleSkyscraper.moveOnScroll(Drupal.behaviors.middleSkyscraper.scM);
82    setTimeout(Drupal.behaviors.openxAsyncSkyscraper.moveOnScroll, 10000, Drupal.behaviors.openxAsyncSkyscraper.scR);
83    setTimeout(Drupal.behaviors.openxAsyncSkyscraper.moveOnScroll, 10000, Drupal.behaviors.openxAsyncSkyscraper.scL);
84    setTimeout(Drupal.behaviors.middleSkyscraper.moveOnScroll, 10000, Drupal.behaviors.middleSkyscraper.scM);
85    $(window).scroll(function () {
86      Drupal.behaviors.openxAsyncSkyscraper.moveOnScroll(Drupal.behaviors.openxAsyncSkyscraper.scR);
87      Drupal.behaviors.openxAsyncSkyscraper.moveOnScroll(Drupal.behaviors.openxAsyncSkyscraper.scL);
88      Drupal.behaviors.middleSkyscraper.moveOnScroll(Drupal.behaviors.middleSkyscraper.scM);
89    });
90  });
91
92}(jQuery));

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.