1/* 2 *** Web2Native2Web - implementation -- BEGIN *** 3 */ 4 5window.zvkGlobals = { 6 appStream: false, 7 nativeUserReg: null, 8 appParamName: 'app', 9 determineTarget: function () { 10 const params = new URLSearchParams(window.location.search); 11 12 if (params.has(this.appParamName)) { 13 const appParam = params.get(this.appParamName); 14 if (appParam === '1') { 15 this.appStream = true; 16 } 17 } 18 }, 19 verifyUser: function (web2native) { 20 if (web2native.userId.length > 0 || web2native.inAppPurchase) { 21 return 2; 22 } else { 23 return 0; 24 } 25 }, 26 Web2Native2Web: (function (exports) { 27 'use strict'; 28 29 var i = ({ callback: n, action: e }) => { 30 window.addEventListener( 31 'message', 32 (r) => { 33 if ( 34 r.data && 35 r.data.channel === 'PP_Native2Web' && 36 r.data.action === e 37 ) { 38 let { action: p, channel: s, ...L } = r.data; 39 n(L.data); 40 } 41 }, 42 !1, 43 ); 44 }; 45 var o = ({ action: n, data: e }) => { 46 window.postMessage({ channel: 'PP_Native2Web', action: n, data: e }); 47 }; 48 var u = class { 49 constructor() { 50 this.handleStopped = (e) => { 51 i({ callback: e, action: 'handleStopped' });
52 }; 53 this.stopped = (e) => { 54 o({ action: 'handleStopped', data: e }); 55 }; 56 this.handleStarted = (e) => { 57 i({ callback: e, action: 'handleStarted' }); 58 }; 59 this.started = (e) => { 60 o({ action: 'handleStarted', data: e }); 61 }; 62 } 63 static getInstance() { 64 return this._instance || (this._instance = new this()); 65 } 66 }; 67 var c = class { 68 constructor() { 69 this.handleShowFirstLayer = (e) => { 70 i({ callback: e, action: 'handleShowFirstLayer' }); 71 }; 72 this.showFirstLayer = () => { 73 o({ action: 'handleShowFirstLayer' }); 74 }; 75 this.handleShowSecondLayer = (e) => { 76 i({ callback: e, action: 'handleShowSecondLayer' }); 77 }; 78 this.showSecondLayer = () => { 79 o({ action: 'handleShowSecondLayer' }); 80 }; 81 } 82 static getInstance() { 83 return this._instance || (this._instance = new this()); 84 } 85 }; 86 var t = ({ action: n, data: e }) => { 87 window.postMessage({ channel: 'PP_Web2Native', action: n, returned: e }); 88 }; 89 var k = ({ action: n }) => 90 new Promise((e) => { 91 let r = (p) => { 92 if ( 93 p.data && 94 p.data.channel === 'PP_Web2Native' && 95 p.data.action === n 96 ) { 97 let { returned: s } = p.data; 98 (e(s), window.removeEventListener('message', r)); 99 } 100 }; 101 window.addEventListener('message', r); 102 }); 103 var a = ({ handler: n, action: e, data: r = {} }) => ( 104 window.webkit !== void 0 && window.webkit.messageHandlers[n] !== void 0 105 ? (console.info('Sending data to iOS ' + n + ' with data:', { 106 action: e, 107 ...r, 108 }), 109 window.webkit.messageHandlers[n].postMessage( 110 JSON.stringify({ action: e, ...r }), 111 )) 112 : typeof window[n] != 'undefined' 113 ? (console.info('Sending data to Android ' + n + ' with data:', { 114 action: e, 115 ...r, 116 }), 117 window[n].postMessage(JSON.stringify({ action: e, ...r }))) 118 : console.info( 119 'no app handler (' + n + ') found - just logging to console', 120 { action: e, ...r }, 121 ), 122 k({ action: e }) 123 ); 124 var d = class { 125 constructor() { 126 this.play = async (e) => 127 a({ handler: 'audioHandler', action: 'play', data: e }); 128 this.returnPlay = (e) => { 129 t({ action: 'play', data: e }); 130 }; 131 this.pause = async () => 132 a({ handler: 'audioHandler', action: 'pause' }); 133 this.returnPause = (e) => { 134 t({ action: 'pause', data: e }); 135 }; 136 } 137 static getInstance() { 138 return this._instance || (this._instance = new this()); 139 } 140 }; 141 var T = class { 142 constructor() { 143 this.add = async (e) => 144 a({ handler: 'bookmarkHandler', action: 'add', data: e }); 145 this.returnAdd = (e) => { 146 t({ action: 'add', data: e }); 147 }; 148 this.remove = async (e) => 149 a({ handler: 'bookmarkHandler', action: 'remove', data: e }); 150 this.returnRemove = (e) => { 151 t({ action: 'remove', data: e }); 152 }; 153 this.getAll = async () => 154 a({ handler: 'bookmarkHandler', action: 'getAll' }); 155 this.returnGetAll = (e) => { 156 t({ action: 'getAll', data: e }); 157 }; 158 } 159 static getInstance() { 160 return this._instance || (this._instance = new this()); 161 } 162 }; 163 var g = class { 164 constructor() { 165 this.getArticleData = async () => 166 a({ handler: 'contentHandler', action: 'getArticleData' }); 167 this.returnGetArticleData = (e) => { 168 t({ action: 'getArticleData', data: e }); 169 }; 170 } 171 static getInstance() { 172 return this._instance || (this._instance = new this()); 173 } 174 }; 175 var m = class { 176 constructor() { 177 this.openLogin = async () => 178 a({ handler: 'nativeScreenHandler', action: 'openLogin' }); 179 this.returnOpenLogin = (e) => { 180 t({ action: 'openLogin', data: e }); 181 }; 182 this.openIap = async (e = {}) => 183 a({ handler: 'nativeScreenHandler', action: 'openIAP', data: e }); 184 this.returnOpenIap = (e) => { 185 t({ action: 'openIAP', data: e }); 186 }; 187 this.openSharing = async (e) => 188 a({ handler: 'nativeScreenHandler', action: 'openSharing', data: e }); 189 this.returnOpenSharing = (e) => { 190 t({ action: 'openSharing', data: e }); 191 }; 192 this.openCustomModal = async (e) => 193 a({ 194 handler: 'nativeScreenHandler', 195 action: 'openCustomModal', 196 data: e, 197 }); 198 this.returnOpenCustomModal = (e) => { 199 t({ action: 'openCustomModal', data: e }); 200 }; 201 } 202 static getInstance() { 203 return this._instance || (this._instance = new this()); 204 } 205 }; 206 var R = class { 207 constructor() { 208 this.disableSwipeNavigation = async () => 209 a({ handler: 'navigationHandler', action: 'disableSwipeNavigation' }); 210 this.returnDisableSwipeNavigation = (e) => { 211 t({ action: 'disableSwipeNavigation', data: e }); 212 }; 213 this.enableSwipeNavigation = async () => 214 a({ handler: 'navigationHandler', action: 'enableSwipeNavigation' }); 215 this.returnEnableSwipeNavigation = (e) => { 216 t({ action: 'enableSwipeNavigation', data: e }); 217 }; 218 this.openArticle = async (e) => 219 a({ handler: 'navigationHandler', action: 'openArticle', data: e }); 220 this.returnOpenArticle = (e) => { 221 t({ action: 'openArticle', data: e }); 222 }; 223 this.openArticleSimple = async (e) => 224 a({ 225 handler: 'navigationHandler', 226 action: 'openArticleSimple', 227 data: e, 228 }); 229 this.returnOpenArticleSimple = (e) => { 230 t({ action: 'openArticleSimple', data: e }); 231 }; 232 this.setArticlePager = async (e) => 233 a({ 234 handler: 'navigationHandler', 235 action: 'setArticlePager', 236 data: e, 237 }); 238 this.returnSetArticlePager = (e) => { 239 t({ action: 'setArticlePager', data: e }); 240 }; 241 this.setArticlePagerSimple = async (e) => 242 a({ 243 handler: 'navigationHandler', 244 action: 'setArticlePagerSimple', 245 data: e, 246 }); 247 this.returnSetArticlePagerSimple = (e) => { 248 t({ action: 'setArticlePagerSimple', data: e }); 249 }; 250 this.openLink = async (e) => 251 a({ handler: 'navigationHandler', action: 'openLink', data: e }); 252 this.returnOpenLink = (e) => { 253 t({ action: 'openLink', data: e }); 254 }; 255 this.openMainMenuEntry = async (e) => 256 a({ 257 handler: 'navigationHandler', 258 action: 'openMainMenuEntry', 259 data: e, 260 }); 261 this.returnOpenMainMenuEntry = (e) => { 262 t({ action: 'openMainMenuEntry', data: e }); 263 }; 264 this.reloadAllWebviews = async () => 265 a({ handler: 'navigationHandler', action: 'reloadAllWebviews' }); 266 this.returnReloadAllWebviews = (e) => { 267 t({ action: 'reloadAllWebviews', data: e }); 268 }; 269 this.reloadWebview = async () => 270 a({ handler: 'navigationHandler', action: 'reloadWebview' }); 271 this.returnReloadWebview = (e) => { 272 t({ action: 'reloadWebview', data: e }); 273 }; 274 } 275 static getInstance() { 276 return this._instance || (this._instance = new this()); 277 } 278 }; 279 var y = class { 280 constructor() { 281 this.pageIsOk = async () => 282 a({ handler: 'statusHandler', action: 'pageIsOkay' }); 283 this.returnPageIsOk = (e) => { 284 t({ action: 'pageIsOkay', data: e }); 285 }; 286 this.pageHasBeenRead = async (e) => 287 a({ handler: 'statusHandler', action: 'pageHasBeenRead', data: e }); 288 this.returnPageHasBeenRead = (e) => { 289 t({ action: 'pageHasBeenRead', data: e }); 290 }; 291 this.setPageMeta = async (e) => 292 a({ handler: 'statusHandler', action: 'setPageMeta', data: e }); 293 this.returnSetPageMeta = (e) => { 294 t({ action: 'setPageMeta', data: e }); 295 }; 296 } 297 static getInstance() { 298 return this._instance || (this._instance = new this()); 299 } 300 }; 301 var S = class { 302 constructor() { 303 this.log = (e) => a({ handler: 'toolHandler', action: 'log', data: e }); 304 this.returnLog = (e) => { 305 t({ action: 'log', data: e }); 306 }; 307 } 308 static getInstance() { 309 return this._instance || (this._instance = new this()); 310 } 311 }; 312 var v = class { 313 constructor() { 314 this.logOut = () => a({ handler: 'userHandler', action: 'logOut' }); 315 this.returnLogOut = (e) => { 316 t({ action: 'logOut', data: e }); 317 }; 318 this.getData = async () => 319 a({ handler: 'userHandler', action: 'getData' }); 320 this.returnGetData = (e) => { 321 t({ action: 'getData', data: e }); 322 }; 323 } 324 static getInstance() { 325 return this._instance || (this._instance = new this()); 326 } 327 }; 328 var A = class { 329 constructor() { 330 this.updateState = (e) => 331 a({ handler: 'cmpHandler', action: 'updateState', data: e }); 332 this.returnUpdateState = (e) => { 333 t({ action: 'updateState', data: e }); 334 }; 335 } 336 static getInstance() { 337 return this._instance || (this._instance = new this()); 338 } 339 }; 340 var P = class { 341 constructor() { 342 this.Audio = d.getInstance(); 343 this.Bookmark = T.getInstance(); 344 this.Content = g.getInstance(); 345 this.NativeScreen = m.getInstance(); 346 this.Navigation = R.getInstance(); 347 this.Status = y.getInstance(); 348 this.Tool = S.getInstance(); 349 this.User = v.getInstance(); 350 this.CMP = A.getInstance(); 351 (window.Web2Native2Web || (window.Web2Native2Web = {}), 352 window.Web2Native2Web.Web2Native || 353 (window.Web2Native2Web.Web2Native = this)); 354 } 355 static getInstance() { 356 return this._instance || (this._instance = new this()); 357 } 358 }, 359 f = P.getInstance(); 360 var M = (n) => { 361 window.onerror = (r, p, s) => ( 362 n({ 363 level: 'exception',
364 timeStamp: new Date().toLocaleString('de-DE'), 365 msg: { error: r, url: p, line: s }, 366 }), 367 !1 368 ); 369 let e = (r) => { 370 let p = console[r].bind(console); 371 return () => { 372 (n({ 373 level: r, 374 timeStamp: new Date().toLocaleString('de-DE'), 375 msg: Array.from(arguments), 376 }), 377 p.apply(console, arguments)); 378 }; 379 }; 380 ['log', 'error', 'warn', 'debug'].forEach((r) => { 381 console[r] = e(r); 382 }); 383 }; 384 var D = class { 385 constructor() { 386 this.nativeLoggingEnabled = !1; 387 this.handleSetFontSize = (e) => { 388 i({ callback: e, action: 'setFontSize' }); 389 }; 390 this.setFontSize = (e) => { 391 o({ action: 'setFontSize', data: e }); 392 }; 393 this.handleEnableNativeLogging = (e) => { 394 i({ callback: e, action: 'enableNativeLogging' }); 395 }; 396 this.enableNativeLogging = () => { 397 (this.nativeLoggingEnabled || 398 (this.handleEnableNativeLogging(() => { 399 M(f.Tool.log); 400 }), 401 o({ action: 'enableNativeLogging' })), 402 (this.nativeLoggingEnabled = !0)); 403 }; 404 } 405 static getInstance() { 406 return this._instance || (this._instance = new this()); 407 } 408 }; 409 var b = class { 410 constructor() { 411 this.handleSetAll = (e) => { 412 i({ callback: e, action: 'handleSetAll' }); 413 }; 414 this.setAll = (e) => { 415 o({ action: 'handleSetAll', data: e }); 416 }; 417 } 418 static getInstance() { 419 return this._instance || (this._instance = new this()); 420 } 421 }; 422 var h = class { 423 constructor() { 424 this.handleSetArticleData = (e) => { 425 i({ callback: e, action: 'handleSetAll' }); 426 }; 427 this.setArticleData = (e) => { 428 o({ action: 'handleSetAll', data: e }); 429 }; 430 } 431 static getInstance() { 432 return this._instance || (this._instance = new this()); 433 } 434 }; 435 var w = class { 436 constructor() { 437 this.handlePageView = (e) => { 438 i({ callback: e, action: 'handlePageView' }); 439 }; 440 this.pageView = (e = { isReturnVisit: !1 }) => { 441 o({ action: 'handlePageView', data: e }); 442 }; 443 } 444 static getInstance() { 445 return this._instance || (this._instance = new this()); 446 } 447 }; 448 var x = class { 449 constructor() { 450 this.Audio = u.getInstance(); 451 this.CMP = c.getInstance(); 452 this.Tool = D.getInstance(); 453 this.Bookmark = b.getInstance(); 454 this.Content = h.getInstance(); 455 this.Tracking = w.getInstance(); 456 (window.Web2Native2Web || (window.Web2Native2Web = {}), 457 window.Web2Native2Web.Native2Web || 458 (window.Web2Native2Web.Native2Web = this)); 459 } 460 static getInstance() { 461 return this._instance || (this._instance = new this()); 462 } 463 }, 464 Kt = x.getInstance(); 465 466 exports.Native2Web = Kt; 467 exports.Native2WebManager = x; 468 exports.Web2Native = f; 469 exports.Web2NativeManager = P; 470 471 return exports; 472 })({}), 473}; // window.zvkGlobals 474 475window.zvkGlobals.determineTarget(); 476 477window.dataLayer = window.dataLayer || []; 478window.dataLayer.push({ userStatus: 0 }); 479 480if (window.zvkGlobals.appStream) { 481 window.zvkGlobals.Web2Native2Web.Web2Native.User.getData().then((result) => { 482 window.zvkGlobals.nativeUserReg = window.zvkGlobals.verifyUser(result); 483 window.dataLayer.find((o) => 'userStatus' in o).userStatus = 484 window.zvkGlobals.nativeUserReg; 485 }); 486} 487 488/* 489 *** Web2Native2Web - implementation -- END *** 490 */ 491 492$(document).ready(function () { 493 window.dataLayer.push({ stickyad: true }); 494 window.dataLayer.push({ testad: false }); 495 496 $('.bg-green').after('text2'); 497 498 $('.tbabo_modal').each(function () { 499 uncutModalIDs = $(this).attr('id'); 500 modalIDs = uncutModalIDs.slice(1); 501 502 initializeTbaboModals(modalIDs); 503 }); 504 505 /* 506 * function (IIFE) to block ads and Date for sold web-articles 507 */ 508 (function blockAd() { 509 let regex = /^\s*anzeige\s*$/i; 510 let search = $('.article-section').text(); 511 512 if (regex.test(search)) { 513 const selectors = [ 514 '#billboard_1', // ad block 515 '#billboard_1_lokal', 516 '.Article-Bottom-Banner', 517 '#billboard_footer', 518 '#medium_rectangle_2', 519 '#medium_rectangle_1', 520 '.webstorypubdate', // date block 521 '.DocCommentModule', // comment block 522 ]; 523 524 $(selectors.join(', ')).addClass('blockAd'); 525 console.log('ADs blocked'); 526 } 527 })();
528 529 $('.paywallContainerLight .card .cardHead').on('click', function () { 530 // Collapse für die Moderne Paywall deaktivert. Zum aktivieren Kommentar entfernen. 531 // $(this).parent().find('.collapse').toggleClass('visible'); 532 $('.paywallContainerLight .card .collapse').removeClass('visible'); 533 $(this).parent().find('.collapse').addClass('visible'); 534 }); 535 536 const billboardElement = 537 "<div id='medium_rectangle_1' style='margin-top: 25px'></div>"; 538 $('.MarketShow_ResultImages_Text').parent().append(billboardElement); 539 540 $('.gzSliderWrapper').each(function () { 541 var $wrapper = $(this); 542 var $sliderNav = $wrapper.find('.gzSliderNav .gzSliderNavItems'); 543 544 // Vor dem Hinzufügen: Alte Nav-Items löschen (verhindert Doppeleinträge) 545 $sliderNav.empty(); 546 547 // Durch jedes Slider-Item gehen und Nav-Einträge erstellen 548 $wrapper.find('.gzSliderItem').each(function () { 549 var headlineText = $(this).find('.headLine').text().trim(); // "headLine" als Tag 550 // Falls "headLine" eine Klasse ist: $(this).find('.headLine').text().trim(); 551 552 if (headlineText) { 553 // Nur hinzufügen, wenn Text vorhanden ist 554 $sliderNav.append( 555 $('<div class="gzSliderNavItem"></div>').append( 556 $('<h4></h4>').text(headlineText), 557 ), 558 ); 559 } 560 }); 561 562 let gzSliderNavItemAmount = $(this).find('.gzSliderNavItem').length; 563 $(this) 564 .find('.gzSliderNav .gzSliderNavItems') 565 .css( 566 'grid-template-columns', 567 'repeat(' + gzSliderNavItemAmount + ', minmax(150px, 1fr))', 568 ); 569 570 $(this).find('.gzSliderNavItem').first().addClass('active'); 571 $(this).find('.gzSliderItems .gzSliderItem').first().addClass('active'); 572 $(this) 573 .find('.gzSliderNavItem') 574 .on('click', function () { 575 $(this).siblings().removeClass('active').end().addClass('active'); 576 let gzSliderItemIndex = $(this).index() * 100 + '%'; 577 let gzSliderItemPadding = $(this).index() * 30 + 'px'; 578 $(this) 579 .parents('.gzSliderWrapper') 580 .find('.gzSliderItems .gzSliderItem') 581 .removeClass('active') // Remove from all 582 .eq($(this).index()) // Select the one at current index 583 .addClass('active'); 584 $(this) 585 .parents('.gzSliderWrapper') 586 .find('.gzSliderItems') 587 .css( 588 'transform', 589 'translateX(calc((' + 590 gzSliderItemIndex + 591 ' - ' + 592 gzSliderItemPadding + 593 ')* -1))', 594 ); 595 }); 596 }); 597 598 const slider = $('.custSlider'); 599 const slides = $('.custSlide'); 600 const dots = $('.custPagination-dot'); 601 602 // Clone first & last slides for infinite effect 603 slider.prepend(slides.last().clone()); 604 slider.append(slides.first().clone()); 605 606 const slideCount = slides.length; 607 let currentSlide = 1; // Start at the "real" first slide (index 1 after prepend) 608 let isAnimating = false; 609 let slideInterval; 610 611 // Function to move slider 612 function goToSlide(index, instant = false) { 613 if (isAnimating) return; 614 isAnimating = true; 615 616 // Calculate translateX (including 32px offset for second slide) 617 const translatePercent = -100 * (index - 1); // Normal slide position 618 const translatePx = (index - 1) * 32; // Dynamic offset (32px per slide) 619 620 // Apply transform (using calc for % + px) 621 slider.css('transition', instant ? 'none' : 'transform 0.5s ease'); 622 slider.css( 623 'transform', 624 `translateX(calc(${translatePercent}% - ${translatePx}px))`, 625 ); 626 627 // Update active dot (handle clone cases) 628 let dotIndex; 629 if (index >= slideCount + 1) { 630 dotIndex = 0; // First real slide (after clone) 631 } else if (index <= 0) { 632 dotIndex = slideCount - 1; // Last real slide (before clone) 633 } else { 634 dotIndex = index - 1; // Convert to 0-based index 635 } 636 637 // Remove active class from all dots and add to current one 638 dots.removeClass('active'); 639 dots.eq(dotIndex).addClass('active'); 640 641 // After animation completes 642 setTimeout(() => { 643 isAnimating = false; 644 645 // If we reached the cloned slide, reset instantly 646 if (index >= slideCount + 1) { 647 currentSlide = 1; 648 goToSlide(currentSlide, true); 649 } else if (index <= 0) { 650 currentSlide = slideCount; 651 goToSlide(currentSlide, true); 652 } 653 }, 500); 654 } 655 656 // Auto-slide every 5 seconds 657 // function startSlider() { 658 // slideInterval = setInterval(() => { 659 // currentSlide++; 660 // goToSlide(currentSlide); 661 // }, 5000); 662 // } 663 664 // Pagination dots click 665 dots.on('click', function () { 666 const slideIndex = $(this).data('slide') + 1; // +1 because we added a clone 667 currentSlide = slideIndex; 668 goToSlide(currentSlide); 669 resetInterval(); 670 }); 671 672 // Reset interval on interaction 673 // function resetInterval() { 674 // clearInterval(slideInterval); 675 // startSlider(); 676 // } 677 678 // Initialize 679 // goToSlide(currentSlide, true); // Set initial position instantly 680 // startSlider(); 681 682 function updateScrollFade(container) { 683 const canScrollLeft = container.scrollLeft > 0; 684 const canScrollRight = 685 container.scrollLeft < container.scrollWidth - container.clientWidth - 1; // -1 wegen Rundungsfehlern 686 687 // Remove any existing arrows first 688 const existingLeftArrow = 689 container.previousElementSibling?.classList?.contains( 690 'scroll-arrow-left', 691 ); 692 const existingRightArrow = 693 container.nextElementSibling?.classList?.contains('scroll-arrow-right'); 694 695 if (existingLeftArrow) container.previousElementSibling.remove(); 696 if (existingRightArrow) container.nextElementSibling.remove(); 697 698 // Create arrows if needed 699 if (canScrollLeft || canScrollRight) { 700 if (canScrollLeft) { 701 const leftArrow = document.createElement('i'); 702 leftArrow.className = 703 'fas fa-chevron-left scroll-arrow scroll-arrow-left'; 704 leftArrow.addEventListener('click', () => { 705 container.scrollBy({ left: -200, behavior: 'smooth' });
706 }); 707 container.parentNode.insertBefore(leftArrow, container); 708 } 709 710 if (canScrollRight) { 711 const rightArrow = document.createElement('i'); 712 rightArrow.className = 713 'fas fa-chevron-right scroll-arrow scroll-arrow-right'; 714 rightArrow.addEventListener('click', () => { 715 container.scrollBy({ left: 200, behavior: 'smooth' }); 716 }); 717 container.parentNode.appendChild(rightArrow); 718 } 719 } 720 721 // Update dataset for styling if needed 722 if (canScrollLeft && canScrollRight) { 723 container.dataset.scrollable = 'both'; 724 } else if (canScrollLeft) { 725 container.dataset.scrollable = 'left'; 726 } else if (canScrollRight) { 727 container.dataset.scrollable = 'right'; 728 } else { 729 container.dataset.scrollable = 'none'; 730 } 731 } 732 733 // Initialization for all .fixedNavi containers 734 document.querySelectorAll('.fixedNavi').forEach((container) => { 735 updateScrollFade(container); 736 container.addEventListener('scroll', () => updateScrollFade(container)); 737 }); 738 739 // On window resize (if scrollability changes) 740 window.addEventListener('resize', () => { 741 document.querySelectorAll('.fixedNavi').forEach(updateScrollFade); 742 }); 743 744 // Optional: Remove border from last StoryPreviewBox inside each .articleContainer 745 document.querySelectorAll('.articleContainer').forEach((container) => { 746 const articles = container.querySelectorAll('.StoryPreviewBox'); 747 const last = articles[articles.length - 1]; 748 if (last) { 749 last.style.border = 'unset'; 750 } 751 }); 752 // Hide Widerruftinfo if form is submitted 753 if ($('.WcmsFormFormSubmitted').length) { 754 $('.WcmsModule.InfoWiderruf.row').hide(); 755 } 756 (function () { 757 'use strict'; 758 if (window.__qmnShift) window.__qmnShift.reset(); 759 760 var reserved = 300 + 120 + 60; // Sitebar 300 + Gap 120 + Rand 60 761 762 // Breitesten zentrierten Container waehlen (Haupt-Content) 763 var pick = null; 764 document 765 .querySelectorAll( 766 'body > *, main, [class*="container"], [class*="wrapper"], [class*="max-w"]', 767 ) 768 .forEach(function (el) { 769 var cs = getComputedStyle(el); 770 if (cs.position === 'fixed' || cs.position === 'sticky') return; 771 var r = el.getBoundingClientRect(); 772 if ( 773 cs.marginLeft !== '0px' && 774 cs.marginLeft === cs.marginRight && 775 r.width > 500 && 776 r.width < innerWidth - 40 && 777 r.height > 300 && 778 (!pick || r.width > pick.width) 779 ) { 780 pick = { el: el, width: r.width }; 781 } 782 }); 783 if (!pick) return console.warn('[qmn] kein Container gefunden'); 784 785 var t = pick.el, 786 s = { 787 ml: t.style.marginLeft, 788 mr: t.style.marginRight, 789 tr: t.style.transition, 790 }; 791 t.style.setProperty('transition', 'margin .35s ease-out', 'important'); 792 793 // Fixierte Navi-Elemente: dieselbe Verschiebung wie der Haupt-Content 794 var naviSelectors = [ 795 '.topbar-inner', 796 '.cust-navi-header', 797 '.cust-navi-navbar', 798 ]; 799 var naviItems = []; 800 naviSelectors.forEach(function (sel) { 801 document.querySelectorAll(sel).forEach(function (el) { 802 naviItems.push({ 803 el: el, 804 ml: el.style.marginLeft, 805 mr: el.style.marginRight, 806 tr: el.style.transition, 807 }); 808 el.style.setProperty('transition', 'margin .35s ease-out', 'important'); 809 }); 810 }); 811 812 function relayout() { 813 var freeSide = (innerWidth - pick.width) / 2; 814 var need = reserved - freeSide; 815 var left = need <= 0 ? freeSide : Math.max(0, freeSide - need); 816 var leftPx = Math.round(left) + 'px'; 817 818 // Haupt-Content verschieben 819 t.style.setProperty('margin-left', leftPx, 'important'); 820 t.style.setProperty('margin-right', 'auto', 'important'); 821 822 // Navi-Elemente gleich verschieben 823 naviItems.forEach(function (it) { 824 it.el.style.setProperty('margin-left', leftPx, 'important'); 825 it.el.style.setProperty('margin-right', 'auto', 'important'); 826 }); 827 } 828 829 relayout(); 830 addEventListener('resize', relayout); 831
832 // Tageblatt: .col-sm-12 zwischen 990 und 1400px linksbündig 833 var tbStyle = document.createElement('style'); 834 tbStyle.id = '__qmn_tb_style'; 835 tbStyle.textContent = 836 '@media (min-width:990px) and (max-width:1400px){' + 837 '.col-sm-12{width:auto !important;margin-left:0 !important;margin-right:auto !important;}' + 838 '}'; 839 document.head.appendChild(tbStyle); 840 841 window.__qmnShift = { 842 reset: function () { 843 removeEventListener('resize', relayout); 844 t.style.marginLeft = s.ml; 845 t.style.marginRight = s.mr; 846 t.style.transition = s.tr; 847 naviItems.forEach(function (it) { 848 it.el.style.marginLeft = it.ml; 849 it.el.style.marginRight = it.mr; 850 it.el.style.transition = it.tr; 851 }); 852 var st = document.getElementById('__qmn_tb_style'); 853 if (st) st.remove(); 854 delete window.__qmnShift; 855 console.log('[qmn] zurueckgesetzt'); 856 }, 857 }; 858 console.log( 859 '[qmn] aktiv (' + 860 naviItems.length + 861 ' Navi-Elemente gefunden). Zuruecksetzen: __qmnShift.reset()', 862 ); 863 })(); 864}); 865 866function initializeTbaboModals(modalIDs) { 867 let modal = $('#' + 'm' + modalIDs); 868 let closeModalBtn = $('#' + 'b' + modalIDs); 869 let openModalBtn = $('.' + 'a' + modalIDs); 870 let overlay = $('.tbabo_overlay'); 871 872 // close modal function 873 function closeModal() { 874 modal.addClass('hidden'); 875 overlay.addClass('hidden'); 876 } 877 // open modal function 878 function openModal() { 879 modal.removeClass('hidden'); 880 overlay.removeClass('hidden'); 881 } 882 883 // close the modal when the close button and overlay is clicked 884 closeModalBtn.on('click', function () { 885 closeModal(); 886 }); 887 overlay.on('click', function () { 888 closeModal(); 889 }); 890 891 // close modal when the Esc key is pressed 892 document.addEventListener('keydown', function (e) { 893 if (e.key === 'Escape' && !modal.classList.contains('hidden')) { 894 closeModal(); 895 } 896 }); 897 898 // open modal event 899 // openModalBtn.addEventListener("click", openModal); 900 openModalBtn.on('click', function () { 901 openModal(); 902 }); 903}
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.