1'use strict' 2 3jQuery(document).ready(function($) { 4 // Initialisiere eine Variable, um zu überprüfen, ob das Scroll-Event bereits ausgeführt wurde 5 var contentLoaded = false; 6 7 // Speichere die 'src' von allen Elementen, die zur Domain 'teedis.com' gehören 8 let lazyLoadTreedisElements = $('[src*="teedis.com"]').map(function() { 9 return { 10 element: this, 11 src: $(this).attr('src') 12 }; 13 }).get(); 14 15 // Speichere nur die 'src' der iFrames, die zu den Domains 'charly.rocks' oder 'my.charly.rocks' gehören 16 let lazyLoadCharlyIframes = $('iframe[src*="charly.rocks"], iframe[src*="my.charly.rocks"]').map(function() { 17 return { 18 element: this, 19 src: $(this).attr('src') 20 }; 21 }).get(); 22 23 // Entferne die 'src' von allen zuvor ausgewählten Elementen von 'teedis.com' 24 lazyLoadTreedisElements.forEach(function(item) { 25 $(item.element).removeAttr('src'); 26 }); 27 28 // Entferne die 'src' von den zuvor ausgewählten iFrames von 'charly.rocks' und 'my.charly.rocks' 29 lazyLoadCharlyIframes.forEach(function(iframe) { 30 $(iframe.element).removeAttr('src'); 31 }); 32 33 // Funktion zum Setzen der 'src' zurück 34 function loadContent() { 35 if (!contentLoaded) { 36 // Setze die 'src' für 'teedis.com' Elemente zurück 37 lazyLoadTreedisElements.forEach(function(item) { 38 $(item.element).attr('src', item.src); 39 }); 40 41 // Setze die 'src' für 'charly.rocks' und 'my.charly.rocks' iFrames zurück 42 lazyLoadCharlyIframes.forEach(function(iframe) { 43 $(iframe.element).attr('src', iframe.src); 44 }); 45 46 // Lade Videos neu, falls vorhanden 47 $('video').each(function() { 48 if ($(this).find('source[src*="teedis.com"]').length > 0) { 49 this.load(); 50 } 51 }); 52 53 // Setze die Variable auf 'true', um anzuzeigen, dass die Inhalte geladen wurden 54 contentLoaded = true; 55 56 // Entferne Event-Listener, um weitere Ausführungen zu verhindern 57 $(document).off('click', loadContent); 58 $(window).off('scroll', loadContent); 59 } 60 } 61 62 // Event-Listener für Klicken und Scrollen hinzufügen 63 $(document).on('click', loadContent); 64 $(window).on('scroll', loadContent); 65});
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.