PageSourceSearch

https://tvtickets.de/js/customfunctions.js

js tvtickets.de collected 2026-10-02 18:55:48 UTC 5,249 bytes, 205 lines download raw bytes

1function getCookie(name) {
2  var dc = document.cookie;
3  var prefix = name + "=";
4  var begin = dc.indexOf("; " + prefix);
5  if (begin == -1) {
6    begin = dc.indexOf(prefix);
7    if (begin != 0) return null;
8  } else {
9    begin += 2;
10    var end = document.cookie.indexOf(";", begin);
11    if (end == -1) {
12      end = dc.length;
13    }
14  }
15  return decodeURI(dc.substring(begin + prefix.length, end));
16}
17
18function setCookie(cname, cvalue, exdays) {
19  var d = new Date();
20  d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);
21  var expires = "expires=" + d.toUTCString();
22  document.cookie = cname + "=" + cvalue + "; " + expires;
23}
24
25function triggersearch(searchstring) {
26  if ($.trim(searchstring).length > 0) {
27    window.location =
28      "tickets.php?mode=search&q=" + encodeURIComponent(searchstring);
29  }
30}
31
32opened = false;
33function resetMenuMode() {
34  opened = false;
35  $("#content").show();
36  $("div.kunden_bar").show();
37  $("footer.footer_top").show();
38  $("body").removeClass("black");
39}
40
41function enterMenuMode() {
42  if (!opened) {
43    $("#content").toggle();
44    $("footer.footer_top").toggle();
45    $("div.kunden_bar").toggle();
46    $("body").addClass("black");
47    opened = true;
48  } else {
49    resetMenuMode();
50  }
51}
52
53function triggerEllipsis() {
54  $(".ellipsis:not(.hidden)").dotdotdot({
55    ellipsis: "... ",
56    wrap: "word",
57    fallbackToLetter: true,
58    after: null,
59    watch: false,
60    height: 200,
61    tolerance: 0,
62    callback: function (isTruncated, orgContent) {},
63    lastCharacter: {
64      remove: [" ", ",", ";", ".", "!", "?"],
65      noEllipsis: [],
66    },
67  });
68
69  $(".sendungstext > div.textwrapper").dotdotdot({
70    ellipsis: "... ",
71    wrap: "word",
72    fallbackToLetter: true,
73    after: null,
74    watch: false,
75    height: 150,
76    tolerance: 0,
77    callback: function (isTruncated, orgContent) {},
78    lastCharacter: {
79      remove: [" ", ",", ";", ".", "!", "?"],
80      noEllipsis: [],
81    },
82  });
83
84  $(".teasertext_tall").dotdotdot({
85    ellipsis: "... ",
86    wrap: "word",
87    fallbackToLetter: true,
88    after: null,
89    watch: false,
90    height: 130,
91    tolerance: 0,
92    callback: function (isTruncated, orgContent) {},
93    lastCharacter: {
94      remove: [" ", ",", ";", ".", "!", "?"],
95      noEllipsis: [],
96    },
97  });
98
99  $(".teasertext_wide").dotdotdot({
100    ellipsis: "... ",
101    wrap: "word",
102    fallbackToLetter: true,
103    after: null,
104    watch: false,
105    height: 130,
106    tolerance: 0,
107    callback: function (isTruncated, orgContent) {},
108    lastCharacter: {
109      remove: [" ", ",", ";", ".", "!", "?"],
110      noEllipsis: [],
111    },
112  });
113}
114
115function f_cookie_standard() {
116  setCookie("ds_disclaimer", "true", "365");
117  location.reload();
118}
119
120function f_cookie_marketing() {
121  setCookie("ds_disclaimer", "true", "365");
122  setCookie("ds_marketing", "true", "365");
123  location.reload();
124}
125
126$(document).ready(function () {
127  $("div.cookie_disclaimer a.close, div.cookie_disclaimer").on(
128    "click",
129    function () {
130      $("div.cookie_disclaimer").fadeOut(500);
131    },
132  );
133
134  triggerEllipsis();
135
136  $(".hidden_button").on("click", function () {
137    //Toggle the div corresponding to the clicked button
138    thediv = $(this).nextAll(".hidden_div").first();
139    new_width = $(this).parent().closest("div").width();
140    thediv.width(new_width);
141    thediv.toggle();
142
143    //Hide all others
144    all = $(".hidden_div").not(thediv).fadeOut("slow");
145  });
146
147  $("#searchbutton").on("click", function () {
148    triggersearch($("#searchstring").val());
149  });
150
151  $("#searchbuttonmedium").on("click", function () {
152    triggersearch($("#searchstringsmall").val());
153  });
154
155  $("#searchbuttonsmall").on("click", function () {
156    triggersearch($("#searchstringsmall").val());
157  });
158
159  $("#searchstring").keyup(function (e) {
160    if (e.keyCode == 13) {
161      triggersearch($("#searchstring").val());
162    }
163  });
164  $("#searchstringmedium").keyup(function (e) {
165    if (e.keyCode == 13) {
166      triggersearch($("#searchstringmedium").val());
167    }
168  });
169  $("#searchstringsmall").keyup(function (e) {
170    if (e.keyCode == 13) {
171      triggersearch($("#searchstringsmall").val());
172    }
173  });
174
175  $(".orbitimage").on("click", function () {
176    window.location = $(this).attr("rel");
177  });
178
179  $(".hide_until_loaded").removeClass("hide_until_loaded");
180
181  //Menu mode functionality
182  $(".toggle-topbar").on("click", function () {
183    enterMenuMode();
184  });
185
186  $(window).resize(function (event) {
187    resetMenuMode();
188  });
189  $("#no_kandidat").change(function () {
190    if (this.checked == true) $("#t_kand_zusatz").hide();
191    else $("#t_kand_zusatz").show();
192  });
193  $("#no_kandidat1").change(function () {
194    if (this.checked == true) $("#t_kand_zusatz1").hide();
195    else $("#t_kand_zusatz1").show();
196  });
197  $("#no_kandidat2").change(function () {
198    if (this.checked == true) $("#t_kand_zusatz2").hide();
199    else $("#t_kand_zusatz2").show();
200  });
201  $("#no_kandidat3").change(function () {
202    if (this.checked == true) $("#t_kand_zusatz3").hide();
203    else $("#t_kand_zusatz3").show();
204  });
205});

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.