PageSourceSearch

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

js diit.cz collected 2026-09-24 09:29:41 UTC 5,954 bytes, 208 lines download raw bytes

1(function($) {
2  Drupal.behaviors.stkf6 = {
3    attach: function(context, settings) {
4      $(document).foundation();
5
6      changeResponsiveBanner();
7      removeSkyScrapers();
8      bindResponsiveVideos();
9      changeResponsiveBannerown();
10
11      jQuery("#mobile-search-img").click(function() {
12        if(jQuery("#search-mobile-collapse").is(":visible")) {
13          jQuery("#search-mobile-collapse").hide();
14        } else {
15          jQuery("#search-mobile-collapse").show();
16        }
17      });
18
19      jQuery("#mobile-search-button").click(function() {
20        var value = jQuery("#mobile-search-input").val();
21        if((jQuery("#mobile-search-input").val())) {
22          var baseUrl = document.location.origin;
23          jQuery(location).attr("href", baseUrl + "/vyhledavani?r=" + value);
24        } else {
25          alert("Vyplňte pole!");
26        }
27      });
28
29      $(window).resize(function(){
30        heightOfSlideshow();
31        makeOrbitActive();
32
33      });
34      $(window).on("orientationchange", function() {
35        heightOfSlideshow();
36        makeOrbitActive();
37
38      });
39      showSearchForm();
40
41      if (getUrlParameter('utm_source') === 'www.seznam.cz' || $.cookie('NGINX_TEMPLATE') === '1') {
42        if ($(".googleNewsSubscribe").length > 0) {
43          $(".googleNewsSubscribe").remove();
44        }
45      } else {
46        const script = document.getElementById("impressionMediaGtm");
47        if (script && script.type === "text/plain") {
48          script.type = "text/javascript";
49          eval(script.innerHTML);
50        }
51      }
52
53      if($("#discussion").length > 0) {
54
55        var discussionElement = $("#discussion");
56
57        window.SZN.DiscussionLoader.load(["embedded"]).then(() => {
58          const instance = SZN.Discussion.create(
59            "cdr",
60            "discussion",
61            {}
62          );
63
64          instance.loadDiscussion(
65            discussionElement.attr("data-permalink"),
66            {
67              title: discussionElement.attr("data-title"),
68              url: discussionElement.attr("data-discussionurl")
69            }
70          );
71        });
72      }
73
74      if ($('.discussion-button').length > 0) {
75        let discussionButton = $('.discussion-button');
76
77        let permlink = discussionButton.attr('data-permlink');
78
79        if (permlink) {
80          window.SZN.DiscussionLoader.load(['commentCount']).then(() => {
81            window.SZN.Discussion.discussionFetchCommentCount(permlink)
82              .then(result => {
83                if (result[permlink]) {
84                  discussionButton.append(` (${result[permlink].commentCount})`);
85                }
86              });
87          });
88        }
89      }
90
91    },
92  };
93
94  function bindResponsiveVideos() {
95    var $imageWrappers = $('.images-one');
96
97    $imageWrappers.each(function($index) {
98      if (
99        $(this)
100          .children()
101          .is('iframe')
102      ) {
103        $(this).addClass('responsive-video-wrapper');
104      }
105    });
106  }
107
108  /**
109    * Remove redundant advertisement containing elements
110    */
111  function changeResponsiveBanner() {
112    if ($(window).width() < 976) {
113      $('.responzive_ad_full').remove();
114      if($('.zone71991').length > 0){
115          $(".zone71991").insertAfter('.field-name-field-perex');
116      }
117    } else {
118      $('.responzive_ad_small').remove();
119      // if($('.zone52').length > 0){
120      //     $('.zone52').remove();
121      // }
122      //
123      //   if($('.zone18').length > 0){
124      //       $('.zone18').remove();
125      //   }
126    }
127  }
128
129  /*
130     * Apply appropriate top banner
131     */
132
133  function changeResponsiveBannerown() {
134    if ($(window).width() < 640) {
135      $('#block-openx-async-leaderboard-640').remove();
136      $('#block-openx-async-leaderboard-980').remove();
137      $('#block-openx-async-fullbranding').remove();
138    } else if ($(window).width() > 640 && $(window).width() < 980) {
139      $('#block-openx-async-leaderboard-320').remove();
140      $('#block-openx-async-leaderboard-980').remove();
141      $('.zone190').remove();
142      $('.zone191').remove();
143    } else {
144      $('#block-openx-async-leaderboard-320').remove();
145      $('#block-openx-async-leaderboard-640').remove();
146      $('.zone190').remove();
147      $('.zone191').remove();
148    }
149  }
150
151  function removeSkyScrapers() {
152    if ($(window).width() <= 1310) {
153//      jQuery('#block-openx-async-skyscraper').remove();
154      jQuery('#block-openx-async-skyscraper-levy').remove();
155      jQuery('#page-wrapper').css({ paddingRight: 0 });
156    }
157  }
158
159  /* foundation slideshow JS override */
160  function heightOfSlideshow() {
161   /* způsobilo nefunkčnost některých javascriptů v androidovském prohlížeči
162    *
163    *  let orbitWithd = $('.hp-slider-responsive').width();
164    */
165    $('.orbit-container').css('height', 'auto');
166    $('.orbit-slide').css('max-height', '400px');
167  }
168
169  function showSearchForm() {
170    if ($(window).width() < 1024) {
171        jQuery('.search-form-responsive').css('display', 'block');
172
173    }
174  }
175  function makeOrbitActive() {
176    if ($(window).width() < 1024) {
177      jQuery('.hp-slider-responsive').addClass('processed');
178      $('.orbit').foundation('geoSync');
179
180    } else {
181        jQuery('.hp-slider-responsive').removeClass('processed');
182    }
183  }
184
185  function getCookie(cname) {
186    let name = cname + "=";
187    let decodedCookie = decodeURIComponent(document.cookie);
188    let ca = decodedCookie.split(';');
189    for(let i = 0; i <ca.length; i++) {
190      let c = ca[i];
191      while (c.charAt(0) == ' ') {
192        c = c.substring(1);
193      }
194      if (c.indexOf(name) == 0) {
195        return c.substring(name.length, c.length);
196      }
197    }
198    return "";
199  }
200
201})(jQuery);
202
203function getUrlParameter(name) {
204  name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
205  let regex = new RegExp('[\\?&]' + name + '=([^&#]*)');
206  let results = regex.exec(location.search);
207  return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
208}

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.