1var $ = jQuery.noConflict(); 2//moment.tz.setDefault("Europe/Berlin"); 3$(window).unload(function () 4 { $(window).unbind('unload'); } 5); 6$(window).bind('pageshow', function(event) { 7 if (event.originalEvent.persisted) { 8 window.location.reload() 9 } 10}); 11 12// Check Browser 13var browserName = ""; 14var userAgent = navigator.userAgent; 15 16if (userAgent.indexOf("Chrome") > -1) { 17 browserName = "browser-Chrome"; 18} else if (userAgent.indexOf("Firefox") > -1) { 19 browserName = "browser-Firefox"; 20} else if (userAgent.indexOf("Safari") > -1) { 21 browserName = "browser-Safari"; 22} else if (userAgent.indexOf("Opera") > -1 || userAgent.indexOf("OPR") > -1) { 23 browserName = "browser-Opera"; 24} else if (userAgent.indexOf("Edge") > -1) { 25 browserName = "browser-Edge"; 26} else if (userAgent.indexOf("Trident") > -1) { 27 browserName = "browser-Ie"; 28} else { 29 browserName = "browser-unknown"; 30} 31$('html').addClass(browserName); 32 33$(window).resize(function(){ 34 var docheight = $(document).height(); 35 var windowWidth = $(window).width(); 36 var windowHeight = $(window).height(); 37 var inpageContentH = $('.content-part-w75').height(); 38 var mainwrapperH = $('.main-wrapper').height(); 39 //$('.content-part-sidebar').css({"min-height": (inpageContentH-30) +"px"}); 40 41 if (mainwrapperH < 1200) { 42 $('.border-cycle-left').hide(); 43 } else { 44 $('.border-cycle-left').show(); 45 } 46 if (mainwrapperH < 2200) { 47 $('.border-cycle-right').hide(); 48 } else { 49 $('.border-cycle-right').show(); 50 } 51//newsitemHL-H 52 $('.newItem h3').removeAttr("style") 53 $('.content-row-newsitems').each(function(){ 54 var newItemhighestBox = 0; 55 $('.newItem h3', this).each(function(){ 56 if($(this).height() > newItemhighestBox) { 57 newItemhighestBox = $(this).height(); 58 } 59 }); 60 $('.newItem h3',this).height(newItemhighestBox); 61 }); 62 //addbanner 63 var addbannerContentWidth = $('.content-row-addbanner .content-row-center').width(); 64 $('.banner-wrapper').css({"width": ""}); 65 $('.banner-wrapper').css({"margin-left": "auto"}); 66 $('.banner-wrapper').each(function(){ 67 var addbannerWidth = $(this).width(); 68 $(this).css({"width": addbannerWidth+"px"}); 69 $(this).css({"margin-left": -(addbannerWidth*0.5)+"px"}); 70 }); 71 //newsgalleryslider empty 72 $('.news-detail .slider-newsgallerywrapper').each(function(){ 73 var $gallimg = $(this).find('img'); 74 if ( $gallimg.length){ 75 $(this).removeClass('displaynone') 76 } else { 77 $(this).addClass('displaynone') 78 } 79 }); 80 81}); 82$(window).trigger('resize'); 83$(window).load(function() { 84 $(window).trigger('resize'); 85}); 86 87 88 89//headerimg 90var headerImgH = $('.content-row-headerImage .headerimage').height(); 91var headerImgHbox = $('.content-row-headerImage').height(); 92if (headerImgH < headerImgHbox) { 93 $('.content-row-headerImage').addClass('lowerImg'); 94 var headerImgW = $('.content-row-headerImage .headerimage').width(); 95 $('.content-row-headerImage .headerimage').css({"margin-left": -(headerImgW/2)+"px"}); 96 97} else { 98 $('.content-row-headerImage').removeClass('lowerImg'); 99 $('.content-row-headerImage .headerimage').css({"margin-left": ""}); 100} 101 102$(window).load(function() { 103 $('.content-row-headerImage').removeClass('lowerImg'); 104 var headerImgH = $('.content-row-headerImage .headerimage').height(); 105 var headerImgHbox = $('.content-row-headerImage').height(); 106 if (headerImgH < headerImgHbox) { 107 $('.content-row-headerImage').addClass('lowerImg'); 108 var headerImgW = $('.content-row-headerImage .headerimage').width(); 109 $('.content-row-headerImage .headerimage').css({"margin-left": -(headerImgW/2)+"px"}); 110 } else { 111 $('.content-row-headerImage').removeClass('lowerImg'); 112 $('.content-row-headerImage .headerimage').css({"margin-left": ""}); 113 } 114}); 115 116 117//ways 118$(function () { 119 $('.trans').each(function(){ 120 var min = 100, max = 250; 121 var delay = Math.floor(Math.random() * (max - min) + min); 122 var _this = this; 123 var inview = new Waypoint({ 124 element: _this, 125 handler: function (direction) { 126 if (direction === 'down') { 127 $(this.element).delay(delay).animate({"opacity": "1"}
127, { duration: 800,easing: "linear" }); 128 } else { 129 //$(this.element).animate({"opacity": "0"}, { duration: 100,easing: "linear" }) 130 } 131 }, 132 offset: '110%' 133 }); 134 }); 135}); 136 137 138 139//page scroll 140if ($(window).width() > 1024) { 141 $(window).scroll(function() { 142 if($(window).scrollTop() > 50){ 143 // $("body").addClass("scroll"); 144 } 145 if($(window).scrollTop() < 51){ 146 //$("body").removeClass("scroll"); 147 } 148 }); 149} 150else { 151 $("body").removeClass("scroll"); 152} 153 154//burgerBTN 155$(".burgerBTN").click(function(){ 156 $('html').toggleClass("mobnavON"); 157}); 158//ces sidebar view 159if ($('div.content-part-sidebar').length) { 160 $('.content-row-ctabanner').addClass('content-row-ctabanner-compact'); 161 $('.content-row-5imagebuttons').addClass('content-row-5imagebuttons-compact'); 162} 163 164//downloadsize 165$('.filesize').each(function(){ 166 var bytesize = $(this).text(); 167 var mbtesize = parseFloat(bytesize/1000000).toFixed(1); 168 $(this).text(' ('+mbtesize+'MB)'); 169}); 170//download subfolders 171var i = 0; 172$(".content-row-downloads .subfolderRows" ).each(function(i) { 173 $(this).addClass("subfolderRows-"+i); 174 $(this).find('h3').css({"padding-left": (i*10)+"px"}); 175}); 176//list 177$('.content-row-2columnlist-numbered').each(function(){ 178 $(this).find( ".columnlist-box-item" ).each(function(){ 179 $(this).find('.indexNr').text($(this).index()+1); 180 }); 181}); 182$('.columnlist-box').each(function(){ 183 var listitemCount = $(this).find('.blanklist .columnlist-box-item').length; 184 var listitemCountLeft = Math.round(listitemCount*0.5); 185 $(this).find('.blanklist .columnlist-box-item:lt('+listitemCountLeft+')').wrapAll('<div class="listbox1"></div>'); 186}); 187setTimeout(function() { 188 $('.columnlist-box').each(function(){ 189 var listbox1 = $(this).find('.listbox1').html(); 190 $(this).find('.columnlist-box-left').html(listbox1); 191 $(this).find('.listbox1').remove(); 192 var listbox2 = $(this).find('.blanklist').html(); 193 $(this).find('.columnlist-box-right').html(listbox2); 194 $(this).find('.blanklist').remove(); 195 }); 196}, 100); 197 198//textbox to list 199var listHTML = $('.content-row-list:eq(0) .listbox').html(); 200if(typeof listHTML !== 'undefined'){ 201 var listItems = listHTML.split('<br>'); 202 $('.content-row-list:eq(0) .listbox').html(''); 203 $.each(listItems, function(i, v){ 204 var item = '<li>' + v + '</li>'; 205 $('.content-row-list:eq(0) .listbox').append(item); 206 }); 207} 208setTimeout(function() { 209 $('.content-row-list:eq(0) .listbox li').each(function() { 210 if($(this).text().trim().length < 1) 211 {$(this).remove(); 212 } 213 }); 214}, 500); 215var listHTML = $('.content-row-list:eq(1) .listbox').html(); 216if(typeof listHTML !== 'undefined'){ 217 var listItems = listHTML.split('<br>'); 218 $('.content-row-list:eq(1) .listbox').html(''); 219 $.each(listItems, function(i, v){ 220 var item = '<li>' + v + '</li>'; 221 $('.content-row-list:eq(1) .listbox').append(item); 222 }); 223} 224setTimeout(function() { 225 $('.content-row-list:eq(1) .listbox li').each(function() { 226 if($(this).text().trim().length < 1) 227 {$(this).remove(); 228 } 229 }); 230}, 500); 231var listHTML = $('.content-row-list:eq(2) .listbox').html(); 232if(typeof listHTML !== 'undefined'){ 233 var listItems = listHTML.split('<br>'); 234 $('.content-row-list:eq(2) .listbox').html(''); 235 $.each(listItems, function(i, v){ 236 var item = '<li>' + v + '</li>'; 237 $('.content-row-list:eq(2) .listbox').append(item); 238 }); 239} 240setTimeout(function() { 241 $('.content-row-list:eq(2) .listbox li').each(function() { 242 if($(this).text().trim().length < 1) 243 {$(this).remove(); 244 } 245 }); 246}, 500); 247var listHTML = $('.content-row-list:eq(3) .listbox').html(); 248if(typeof listHTML !== 'undefined'){ 249 var listItems = listHTML.split('<br>'); 250 $('.content-row-list:eq(3) .listbox').html(''); 251 $.each(listItems, function(i, v){ 252 var item = '<li>' + v + '</li>'; 253 $('.content-row-list:eq(3) .listbox').append(item); 254 }); 255} 256setTimeout(function() { 257 $('.content-row-list:eq(3) .listbox li').each(function() { 258 if($(this).text().trim().length < 1) 259 {$(this).remove(); 260 } 261 }); 262}, 500); 263var listHTML = $('.content-row-list:eq(4) .listbox').html(); 264if(typeof listHTML !== 'undefined'){ 265 var listItems = listHTML.split('<br>'); 266 $('.content-row-list:eq(4) .listbox').html(''); 267 $.each(listItems, function(i, v){ 268 var item = '<li>' + v + '</li>'; 269 $('.content-row-list:eq(4) .listbox').append(item); 270 }); 271} 272setTimeout(function() { 273 $('.content-row-list:eq(4) .listbox li').each(function() { 274 if($(this).text().trim().length < 1) 275 {$(this).remove(); 276 } 277 }); 278}, 500); 279var listHTML = $('.content-row-list:eq(5) .listbox').html(); 280if(typeof listHTML !== 'undefined'){ 281 var listItems = listHTML.split('<br>'); 282 $('.content-row-list:eq(5) .listbox').html(''); 283 $.each(listItems, function(i, v){ 284 var item = '<li>' + v + '</li>'; 285 $('.content-row-list:eq(5) .listbox').append(item); 286 }); 287} 288setTimeout(function() { 289 $('.content-row-list:eq(5) .listbox li').each(function() { 290 if($(this).text().trim().length < 1) 291 {$(this).remove(); 292 } 293 }); 294}, 500); 295 296 297var listHTML = $('.content-row-list:eq(6) .listbox').html(); 298if(typeof listHTML !== 'undefined'){ 299 var listItems = listHTML.split('<br>'); 300 $('.content-row-list:eq(6) .listbox').html(''); 301 $.each(listItems, function(i, v){ 302 var item = '<li>' + v + '</li>'; 303 $('.content-row-list:eq(6) .listbox').append(item); 304 }); 305} 306setTimeout(function() { 307 $('.content-row-list:eq(6) .listbox li').each(function() { 308 if($(this).text().trim().length < 1) 309 {$(this).remove(); 310 } 311 }); 312}, 500); 313var listHTML = $('.content-row-list:eq(7) .listbox').html(); 314if(typeof listHTML !== 'undefined'){ 315 var listItems = listHTML.split('<br>'); 316 $('.content-row-list:eq(7) .listbox').html(''); 317 $.each(listItems, function(i, v){ 318 var item = '<li>' + v + '</li>'; 319 $('.content-row-list:eq(7) .listbox').append(item); 320 }); 321} 322setTimeout(function() { 323 $('.content-row-list:eq(7) .listbox li').each(function() { 324 if($(this).text().trim().length < 1) 325 {$(this).remove(); 326 } 327 }); 328}, 500); 329var listHTML = $('.content-row-list:eq(8) .listbox').html(); 330if(typeof listHTML !== 'undefined'){ 331 var listItems = listHTML.split('<br>'); 332 $('.content-row-list:eq(8) .listbox').html(''); 333 $.each(listItems, function(i, v){ 334 var item = '<li>' + v + '</li>'; 335 $('.content-row-list:eq(8) .listbox').append(item); 336 }); 337} 338setTimeout(function() { 339 $('.content-row-list:eq(8) .listbox li').each(function() { 340 if($(this).text().trim().length < 1) 341 {$(this).remove(); 342 } 343 }); 344}, 500); 345var listHTML = $('.content-row-list:eq(9) .listbox').html(); 346if(typeof listHTML !== 'undefined'){ 347 var listItems = listHTML.split('<br>'); 348 $('.content-row-list:eq(9) .listbox').html(''); 349 $.each(listItems, function(i, v){ 350 var item = '<li>' + v + '</li>'; 351 $('.content-row-list:eq(9) .listbox').append(item); 352 }); 353} 354setTimeout(function() { 355 $('.content-row-list:eq(9) .listbox li').each(function() { 356 if($(this).text().trim().length < 1) 357 {$(this).remove(); 358 } 359 }); 360}, 500); 361var listHTML = $('.content-row-list:eq(10) .listbox').html(); 362if(typeof listHTML !== 'undefined'){ 363 var listItems = listHTML.split('<br>'); 364 $('.content-row-list:eq(10) .listbox').html(''); 365 $.each(listItems, function(i, v){ 366 var item = '<li>' + v + '</li>'; 367 $('.content-row-list:eq(10) .listbox').append(item); 368 }); 369} 370setTimeout(function() { 371 $('.content-row-list:eq(10) .listbox li').each(function() { 372 if($(this).text().trim().length < 1) 373 {$(this).remove(); 374 } 375 }); 376}, 500); 377//table 378 $.fn.wrapInTag = function(opts) { 379 var o = $.extend({ 380 words: [], 381 tag: '<strong>' 382 }, opts); 383 return this.each(function() { 384 var html = $(this).html(); 385 for (var i = 0, len = o.words.length; i < len; i++) {
386 var re = new RegExp(o.words[i], "gi"); 387 html = html.replace(re, o.tag + '$&' + o.tag.replace('<', '</')); 388 } 389 $(this).html(html); 390 }); 391 }; 392 $('.tablebox th, .tablebox td').wrapInTag({ 393 words: ['Ë ', 'Ë'], 394 tag: '<span class="bigger">' 395 }) 396 397 398//openfilter 399if ($(window).width() > 1023) { 400 setTimeout(function() { 401 $('.content-part-newsfilter').addClass('filterboxOpen'); 402 }, 1000); 403} 404//accordion 405$(".content-row-accordion .accordion-item-titel").click(function(){ 406 $(this).closest('.accordion-item').toggleClass("accordion-item-on"); 407}); 408$('.content-row-accordion-numbered').each(function(){ 409 $(this).find( ".accordion-item" ).each(function(){ 410 $(this).find('.titlenr').text($(this).index()+1+'.'); 411 }); 412}); 413 414// content-row-imagetextraste 415 416$('.content-row-imagetextraster').each(function(){ 417 $(this).find(".imagetext-item:nth-child(4n)").after('<div class="break"></div>'); 418}); 419$('.content-part-newsoverview').each(function(){ 420 $(this).find(".newItem:nth-child(3n)").after('<div class="break"></div>'); 421}); 422//newscat 423$('.catItem:empty').hide(); 424 425//scrollTop 426$(".scrollTopBTN").click(function(){ 427 $("html, body").animate({ scrollTop : 0 }, { duration: 800,easing: "easeOutQuint" }); 428 return false; 429}); 430 431 432//externlinks 433$("a[href$='pdf']").attr('target','_blank'); 434 435 436$('.landesverband-selector a').removeAttr("target"); 437$('.metalinkLogin,.metalinkLogout').removeAttr("target"); 438 $('.landesverband-selector').on('click', function () { 439 if ($(this).hasClass("landesverband-selector-on")) { 440 $(this).removeClass('landesverband-selector-on'); 441 } else { 442 $(this).addClass('landesverband-selector-on'); 443 } 444 }); 445 446//emptys 447$('emptydivs').each(function(){ 448 if (!$.trim($(this).text())) { 449 $(this).fadeOut(0); 450 } 451}); 452//heromenu 453if ($(window).width() > 1023) { 454$('.hero-menu .level-0').on('click mouseenter', function () { 455 if ($(this).hasClass("heroItemActive")) { 456 $('.hero-menu .level-0').removeClass('heroItemActive'); 457 } 458 $('.hero-menu .level-0').removeClass('heroItemActive'); 459 $(this).addClass('heroItemActive'); 460 var menuctaID = $(this).data('id'); 461 var menuctaimg = $('.menu-cta_'+menuctaID).find('img').attr("src"); 462 var menuctatext = $('.menu-cta_'+menuctaID).text(); 463 var menuctalink = $('.menu-cta_'+menuctaID).find('a').attr("href"); 464 $(".heroCtaBox .heroCtaBox-image").attr("src",'/Resources/Public/Images/menucta-standard.jpg'); 465 $(".heroCtaBox .heroCtaBox-image").attr("src",menuctaimg); 466 $(".heroCtaBox .heroCtaBox-text").text(menuctatext); 467 $(".heroCtaBox a").attr("href",'#'); 468 $(".heroCtaBox a").attr("href",menuctalink); 469 470}); 471 $('.content-row-header-meta,.logo,.sidebtn,.content-row-headerImage,#main, .content-row-heroslider, footer, .content-row-footer-cta, .box-playerprofile, .box-clubprofile, .box-clubprofile, .box-teamprofile').on('mouseenter', function () { 472 $('.hero-menu .level-0').removeClass('heroItemActive'); 473 }); 474} else { 475 $('.hero-menu .level-0').on('click', function () { 476 if ($(this).hasClass("heroItemActive")) { 477 //$('.hero-menu .level-0').removeClass('heroItemActive'); 478 } 479 // $('.hero-menu .level-0').removeClass('heroItemActive'); 480 // $("html, body").animate({ scrollTop :$('#mainMenu').offset().top -100 }, { duration: 500,easing: "easeOutQuint" }); 481 $(this).toggleClass('heroItemActive'); 482 var menuctaID = $(this).data('id'); 483 var menuctaimg = $('.menu-cta_'+menuctaID).find('img').attr("src"); 484 var menuctatext = $('.menu-cta_'+menuctaID).text(); 485 var menuctalink = $('.menu-cta_'+menuctaID).find('a').attr("href"); 486 $(".heroCtaBox .heroCtaBox-image").attr("src",'/Resources/Public/Images/menucta-standard.jpg'); 487 $(".heroCtaBox .heroCtaBox-image").attr("src",menuctaimg); 488 $(".heroCtaBox .heroCtaBox-text").text(menuctatext); 489 $(".heroCtaBox a").attr("href",'#'); 490 $(".heroCtaBox a").attr("href",menuctalink); 491 492 }); 493} 494//filter 495$('.filterboxBtnrow').on('click', function () {
496 $(this).closest('.content-part-newsfilter').toggleClass('filterboxOpen'); 497}); 498$('.filterItem').on('click', function () { 499 if (!$(this).hasClass("filterItem-singlecheck")) { 500 $(this).closest('.filtersection').find('.filterItem').not('.filterItem-singlecheck').removeClass('filterItemOn'); 501 $(this).addClass('filterItemOn'); 502 } 503 504}); 505$('.filterItem-singlecheck').on('click', function () { 506 $(this).toggleClass('filterItemOn'); 507}); 508$('.classSwitcher .filterItem').on('click', function () { 509 $(this).closest('.classSwitcher').find('.filterItem').removeClass('filterItemOn'); 510 $(this).addClass('filterItemOn'); 511 $(".box-playerprofile .statistikswitchBTN-tournaments").trigger("click"); 512}); 513$('.filterItemAll').on('click', function () { 514 $(this).closest('.filtersection').find('.filterItem').removeClass('filterItemOn'); 515 $(this).addClass('filterItemOn'); 516}); 517$('.btnfilterreset').on('click', function () { 518 $('.filterItem').removeClass('filterItemOn'); 519 $('.filterItemAll, .filterItem-region-all, .filterItem-age-All, .filterItem-category-all, .filterItem-period-current').addClass('filterItemOn'); 520 $('.newssearchform input, .filtersection input').not(':input[type=button], :input[type=submit]').val(''); 521 return false; 522}); 523//add clubserachbutton 524if ($('.content-row-leaguemenu .horizontmenu-itembox').length) { 525 $(".content-row-leaguemenu .horizontmenu-itembox").append('<a href="/vereine" class="horizontmenu-item horizontmenu-item-clubsearch animateAll"><span class="linkspan">Vereinssuche</span></a>'); 526} 527if ($('.main-wrapper-clubs').length) { 528 $('.horizontmenu-item-clubsearch').addClass('horizontmenu-item-On'); 529 530} 531//paging 532var pagingCount = $('.btnpaging').data('firstresults'); 533if(typeof pagingCount != 'undefined') { 534} else { 535 //console.log('pagingCount notdefined'); 536} 537$('.btnpaging').on('click', function () { 538 $('body').addClass('pagingactive'); 539 var pagingCount = $(this).data('firstresults'); 540 $('.btnpaging').data('firstresults',pagingCount+100); 541 var pagingCount = $(this).data('firstresults'); 542 $(".btnfiltersubmit").trigger("click"); 543 return false; 544}); 545 546 547 548$('.backbtnMeeting, .sidebarLink').on('click', function () { 549 $('.content-row-leaguemain, html').removeClass('showMeetingdetail'); 550 $('.referee').removeAttr('style'); 551 return false; 552}); 553$('.backbtnTounament').on('click', function () { 554 $('.tournament-sharelink').removeClass('showurl'); 555 $('.tournament-sharelink').removeAttr("data-sharelink"); 556 window.history.pushState("data","Title","/turniere/"); 557 $('html').removeClass('ShowtournamentDetail ShowtournamentPlayerlist ShowtournamentTimetable PlayerProfileOn'); 558 var scrollTopPositionOverview = localStorage.getItem('scrollTopOverview'); 559 $("html, body").animate({ scrollTop : scrollTopPositionOverview }, { duration: 300,easing: "easeOutQuint" }); 560 return false; 561}); 562$('.backbtnTplayerProfile').on('click', function () { 563 var scrollTopPositionOverview = localStorage.getItem('scrollTop'); 564 $("html, body").animate({ scrollTop : scrollTopPositionOverview }, { duration: 300,easing: "easeOutQuint" }); 565 return false; 566}); 567 568$('.turnipadinfo').on('click', function () { 569 $(this).fadeOut(800); 570 return false; 571}); 572//internationalstatstabs 573$('.content-row-internationalstats .tabbtn').on('click', function () { 574 $('.content-row-internationalstats .tabbtn').removeClass('tabbtnOn'); 575 $(this).addClass('tabbtnOn'); 576 return false; 577}); 578$('.content-row-internationalstats .tabbtn-tab1').on('click', function () { 579 $('.content-row-internationalstats .tabcontenbox').removeClass('tabcontenbox-show'); 580 $('.content-row-internationalstats .tabcontenbox1').addClass('tabcontenbox-show'); 581 return false; 582}); 583$('.content-row-internationalstats .tabbtn-tab2').on('click', function () { 584 $('.content-row-internationalstats .tabcontenbox').removeClass('tabcontenbox-show'); 585 $('.content-row-internationalstats .tabcontenbox2').addClass('tabcontenbox-show'); 586 return false; 587}); 588$('.content-row-internationalstats .rankingListboxsingle .tableswitcherbtn').on('click', function () { 589 $('.content-row-internationalstats .rankingListboxsingle .tableswitcherbtn').removeClass('tableswitcherbtnOn'); 590 return false;
591}); 592$('.content-row-internationalstats .rankingListboxdouble .tableswitcherbtn').on('click', function () { 593 $('.content-row-internationalstats .rankingListboxdouble .tableswitcherbtn').removeClass('tableswitcherbtnOn'); 594 return false; 595}); 596$('.content-row-internationalstats .tableswitcherbtn').on('click', function () { 597 $(this).addClass('tableswitcherbtnOn'); 598 return false; 599}); 600$('.content-row-internationalstats .rankingListboxsingle .tableswitcherbtn-male').on('click', function () { 601 $('.content-row-internationalstats .rankingListboxsingle .rankingListboxsitems-atp').addClass('rankingListboxsitems-show'); 602 $('.content-row-internationalstats .rankingListboxsingle .rankingListboxsitems-wta').removeClass('rankingListboxsitems-show'); 603 return false; 604}); 605$('.content-row-internationalstats .rankingListboxsingle .tableswitcherbtn-female').on('click', function () { 606 $('.content-row-internationalstats .rankingListboxsingle .rankingListboxsitems-atp').removeClass('rankingListboxsitems-show'); 607 $('.content-row-internationalstats .rankingListboxsingle .rankingListboxsitems-wta').addClass('rankingListboxsitems-show'); 608 return false; 609}); 610$('.content-row-internationalstats .rankingListboxdouble .tableswitcherbtn-male').on('click', function () { 611 $('.content-row-internationalstats .rankingListboxdouble .rankingListboxsitems-atp').addClass('rankingListboxsitems-show'); 612 $('.content-row-internationalstats .rankingListboxdouble .rankingListboxsitems-wta').removeClass('rankingListboxsitems-show'); 613 return false; 614}); 615$('.content-row-internationalstats .rankingListboxdouble .tableswitcherbtn-female').on('click', function () { 616 $('.content-row-internationalstats .rankingListboxdouble .rankingListboxsitems-atp').removeClass('rankingListboxsitems-show'); 617 $('.content-row-internationalstats .rankingListboxdouble .rankingListboxsitems-wta').addClass('rankingListboxsitems-show'); 618 return false; 619}); 620//sharelinks 621var currenturl = window.location.href; 622$('.socialitem-fb').attr('href','https://www.facebook.com/sharer/sharer.php?u='+currenturl) 623$('.socialitem-twitter').attr('href','http://twitter.com/share?url='+currenturl) 624$('.socialitem-linkedin').attr('href','https://www.linkedin.com/sharing/share-offsite/?url='+currenturl) 625$('.socialitem-whatsapp').attr('href','whatsapp://send?text='+currenturl) 626$('.socialitem-mail').attr('href','mailto:?subject=Diese%20ÃTV%20News%20ist%20interessant&body='+currenturl) 627//sticky banner 628$('.BTN-bannerclose').on('click', function () { 629 $('.content-row-addbannersticky').addClass('content-row-addbannersticky-off'); 630 $(".content-row-addbannersticky").remove(); 631 return false; 632}); 633 634 635//stickybanner 636function checkInsForValidImage() { 637 const $ins = $(".content-row-addbannersticky ins"); 638 639 if (!$ins.length) return; 640 641 let hasValidImage = false; 642 643 $ins.find("img").each(function () { 644 const w = $(this).width(); 645 const h = $(this).height(); 646 647 if (w > 0 && h > 0) { 648 hasValidImage = true; 649 return false; 650 } 651 }); 652 653 if (hasValidImage) { 654 $(".content-row-addbannersticky").removeClass('content-row-addbannersticky-off'); 655 656 657 } 658} 659$(document).ready(function () { 660 checkInsForValidImage(); 661}); 662let runs = 0; 663const interval = setInterval(function () { 664 checkInsForValidImage(); 665 runs++; 666 if (runs >= 5) { 667 clearInterval(interval); 668 } 669}, 1000); 670 671//search 672if ( $('.searchwrapper').length){ 673 $('body').addClass('searchpage'); 674} 675 676 677 678//scrolldirection 679/* 680if ($(window).width() > 1024) { 681$(function(){ 682 var lastScrollTop = 0, delta = 5; 683 $(window).scroll(function(){ 684 var nowScrollTop = $(this).scrollTop(); 685 if(Math.abs(lastScrollTop - nowScrollTop) >= delta){ 686 if (nowScrollTop > lastScrollTop){ 687 // $('html').removeClass('scrollingUP'); 688 // $('html').addClass('scrollingDown'); 689 } else { 690 // $('html').addClass('scrollingUP'); 691 // $('html').removeClass('scrollingDown'); 692 } 693 lastScrollTop = nowScrollTop; 694 } 695 }); 696}); 697} 698*/ 699 700//statstik parts 701$('.archivetoggleBTN').on('click', function () { 702 $(this).closest('.sidebarbox-archive').toggleClass('sidebarbox-archive-on'); 703 return false;
704}); 705 706 707//date correction 708$('.datefield').each(function(){ 709 moment.locale('de') 710 var datefield = moment($(this).text()).format('DD.MM.YYYY'); 711 $(this).text(datefield); 712}); 713 714$('.datetimefield').each(function(){ 715 moment.locale('de') 716 var datetimefield = moment($(this).text()).format('DD.MM.YYYY, HH:mm'); 717 $(this).text(datetimefield); 718}); 719 720//copyrightimage 721$('.copytext').each(function(){ 722 if ($(this).width() < 18) { 723 $(this).hide(); 724 } 725}); 726$('.creatortext').each(function(){ 727 if ($(this).width() < 18) { 728 $(this).hide(); 729 } 730}); 731//news paging 732 733 734if ( $('.content-part-newsoverview .news ul li').length > 50 ) { 735$(".content-part-newsoverview .news ul li.current").nextAll().eq(10).addClass('nextstop'); 736$(".content-part-newsoverview .news ul li.current").prevAll().eq(10).addClass('prevstop'); 737$(".content-part-newsoverview .news ul li.current").prevUntil("li.prevstop").addClass('showLi'); 738$(".content-part-newsoverview .news ul li.current").nextUntil("li.nextstop").addClass('showLi'); 739} else { 740 $('.content-part-newsoverview .news ul li').addClass('lowpaging'); 741} 742 743 744$('.content-part-newsfilter .filtersection.filtersectio-cat a').on('click', function () { 745 var clicktedCat = $(this).find('.filterItem').text(); 746 localStorage.setItem('newsCat', clicktedCat); 747}); 748 749var activeCat = localStorage.getItem('newsCat'); 750var newsFrom = localStorage.getItem('newsFrom');
751var newsTo = localStorage.getItem('newsTo'); 752$('.content-part-newsfilter .filtersection.filtersectio-cat a .filterItem').removeClass('filterItemOn'); 753//$('.content-part-newsfilter .filtersection.filtersectio-cat a .filterItem:contains('+activeCat+')').addClass('filterItemOn'); 754 755//$('#periodcustomfrom').val(newsFrom); 756//$('#periodcustomto').val(newsTo); 757 758if(newsFrom === "") { 759 // $('.filterItem-dateall').addClass('filterItemOn'); 760} 761 762//news date 763$('.filterItem-dateall').on('click', function () { 764 $(".content-part-newsfilter .filtersection.filtersectio-cat .filterItemOn").trigger("click"); 765 $('#periodcustomfrom').val(''); 766 $('#periodcustomto').val(''); 767 localStorage.setItem('newsFrom', ''); 768 localStorage.setItem('newsTo', ''); 769 return false; 770}); 771 772 773localStorage.setItem('newsFrom', ''); 774localStorage.setItem('newsTo', ''); 775 776 777//news parts from url 778setTimeout(function() { 779 localStorage.setItem('newsFrom', ''); 780 localStorage.setItem('newsTo', ''); 781 localStorage.setItem('newsCat', ''); 782 $('.news-overview .filterItem').removeClass('filterItemOn'); 783 $('.news-overview .filtersectio-cat a').each(function(){ 784 var thishref = $(this).attr('href'); 785 $(this).attr('href',thishref+'/'); 786 }); 787 var newsdatepart = "d"; 788 var newscatpart = "cat"; 789 var newsurlurl = window.location.href; 790 var newsdate = newsurlurl.indexOf(newsdatepart); 791 var newscat = newsurlurl.indexOf(newscatpart); 792 if (newsdate !== -1) { 793 var newsdatepartStart = newsurlurl.substring(newsdate + newsdatepart.length + 1).split("/")[0]; 794 var newsdatepartEnd = newsurlurl.substring(newsdate + newsdatepart.length + 1).split("/")[1]; 795 $('#periodcustomfrom').val(newsdatepartStart); 796 $('#periodcustomto').val(newsdatepartEnd); 797 } else { 798 $('.filterItem-dateall').addClass('filterItemOn'); 799 800 } 801 if (newscat !== -1) { 802 var newsCatname = newsurlurl.substring(newscat + newscatpart.length + 1).split("/")[0]; 803 var newsCatnamefilterUrl = "a[href*='/news/cat/"+newsCatname+"/']"; 804 $('.news-overview').find(newsCatnamefilterUrl).find('.filterItem').addClass('filterItemOn'); 805 } else { 806 $('.filterItemAll').addClass('filterItemOn'); 807 } 808 809 810 $('.btnfiltersubmit-newsperiod').on('click', function () { 811 var currentNewscatUrl = $('.filtersectio-cat .filterItemOn').closest('a').attr('href'); 812 var starDatefrom = $('#periodcustomfrom').val(); 813 if(starDatefrom === "") { 814 var starDatefrom = "2020-01-01"; 815 } 816 var starDateto = $('#periodcustomto').val(); 817 if(starDateto === "") { 818 var starDatefrom = "2099-01-01"; 819 } 820 window.location.href = currentNewscatUrl+'d/'+starDatefrom+'/'+starDateto; 821 return false; 822 }); 823}, 1000); 824 825//nlstyles 826$('.content-row-singleimage .singleimage, .inpageHL h2, .content-row-singletext .btn-red-filled, .listHL, .imagerasterbox .imageitem').removeAttr('style'); 827//imagelink 828$('.imageinlinelink').each(function(){ 829 var imageinlineUrl = $(this).attr('href').replace('_blank', '').replace(' ', '') ; 830 $(this).attr('href',imageinlineUrl); 831}); 832//gallery 833$('.galleryImg').each(function(){ 834 var galleryImgUrl = $(this).attr('src'); 835 $(this).closest('.galleryItem').find('a').attr('href',galleryImgUrl); 836}); 837//gallery slider 838$('.slider-newsgallery .newsgallery-item:first').remove(); 839 840$('.slider-newsgallery').slick({ 841 infinite: true, 842 slidesToShow: 2, 843 slidesToScroll: 1, 844 prevArrow:"<div class='sliderarrow-left sliderarrow-item'><img src='/Resources/Public/Images/icon-slider-left.svg' alt='' class='sliderarrow sliderarrow-left'></div>", 845 nextArrow:"<div class='sliderarrow-right sliderarrow-item'><img src='/Resources/Public/Images/icon-slider-right.svg' alt='' class='sliderarrow sliderarrow-right'></div>", 846 responsive: [{ 847 breakpoint: 767, 848 settings: { 849 slidesToShow: 1 850 } 851 }, { 852 breakpoint: 520, 853 settings: { 854 slidesToShow: 1 855 } 856 }] 857}); 858 859//hero slider 860$('.heroslider-wrapper .slider-for').slick({ 861 slidesToShow: 1, 862 slidesToScroll: 1,
863 arrows: false, 864 fade: true, 865 asNavFor: '.heroslider-wrapper .slider-nav', 866 autoplay: false, 867 autoplaySpeed: 6000, 868 infinite: true, 869 arrows: false, 870 speed: 800 871}); 872$('.heroslider-wrapper .slider-nav').slick({ 873 slidesToShow: 4, 874 slidesToScroll: 1, 875 asNavFor: '.heroslider-wrapper .slider-for', 876 dots: false, 877 focusOnSelect: true, 878 autoplay: false, 879 autoplaySpeed: 6000, 880 infinite: true, 881 arrows: false, 882 speed: 800, 883 responsive: [{ 884 breakpoint: 768, 885 settings: { 886 infinite: false, 887 slidesToShow: 2 888 } 889 }, { 890 breakpoint: 520, 891 settings: { 892 infinite: false, 893 slidesToShow: 2 894 } 895 }] 896}); 897 898 899if ($('.heroslider-wrapper').length) { 900 $('.heroslidernavItem.slick-current').removeClass('slick-current'); 901 $('.heroslidernavItem:first').trigger("click"); 902setInterval(function () { 903 if ($(".heroslidernavItem:last").hasClass("slick-current")) { 904 $('.heroslidernavItem:first').trigger("click"); 905 } else { 906 $('.heroslidernavItem.slick-current').next('.heroslidernavItem').trigger("click"); 907 } 908 909 910}, 9000); 911} 912$('.logo-slider').slick({ 913 slidesToShow: 6, 914 slidesToScroll: 1, 915 autoplay: true, 916 autoplaySpeed: 3000, 917 arrows: false, 918 dots: false, 919 pauseOnHover: false, 920 responsive: [{ 921 breakpoint: 768, 922 settings: { 923 slidesToShow: 4 924 } 925 }, { 926 breakpoint: 520, 927 settings: { 928 slidesToShow: 2 929 } 930 }] 931}); 932 933 934//submenuslider 935$('.subMenuBoxSlider').slick({ 936 slidesToShow: 5, 937 autoplay: false, 938 arrows: true, 939 dots: false, 940 pauseOnHover: false, 941 responsive: [{ 942 breakpoint: 768, 943 settings: { 944 slidesToShow: 2 945 } 946 }, { 947 breakpoint: 768, 948 settings: { 949 slidesToShow: 1 950 } 951 }] 952}); 953if (!$('.subMenuBox').text().trim().length) { 954 $('.subMenuBox').addClass("subMenuBoxEmpty"); 955} 956var subMenuBoxitems = $('.subMenuBox .slick-slide').length; 957if ($(window).width() > 768) { 958 if (subMenuBoxitems < 5) { 959 $('.subMenuBox').addClass("noslide"); 960 } 961} 962else { 963 if (subMenuBoxitems < 2) { 964 $('.subMenuBox').addClass("noslide"); 965 } 966} 967setTimeout(function() { 968 $('.subMenuBox').fadeTo(600, 1); 969 970}, 1000); 971 972//loginbackurl 973$('.metalinkLogin').attr('href',$('.metalinkLogin')[0].href + "?redirect_url=" + document.location.href); 974//liga games detail 975$.getScript("/Resources/Public/js/login.js", function() {}); 976 977 978(function () { 979 window.isMatomoLoaded = function () { 980 return !!(window.Matomo && 981 typeof window.Matomo.getAsyncTrackers === 'function' && 982 window.Matomo.getAsyncTrackers().length > 0); 983 }; 984 985 window.whenMatomoReady = function (cb) { 986 if (window.isMatomoLoaded()) { 987 cb(window.Matomo.getAsyncTracker()); 988 return; 989 } 990 window.matomoAsyncInit = window.matomoAsyncInit || []; 991 window.matomoAsyncInit.push(function () { 992 var tracker = window.Matomo.getAsyncTracker(); 993 if (tracker) cb(tracker); 994 }); 995 }; 996 997 window.withMatomoTracking = function (fn) { 998 window.whenMatomoReady(function (tracker) { 999 if (tracker) { 1000 try { fn(tracker); } catch (e) { } 1001 } 1002 }); 1003 }; 1004})(); 1005 1006function trackVirtualPageView(url, title) { 1007 window.withMatomoTracking(function (t) { 1008 t.setCustomUrl(url); 1009 t.setDocumentTitle(title); 1010 t.trackPageView(); 1011 }); 1012}
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.