1jQuery.noConflict(); 2window.onload = function() { 3 if (typeof audioplayer_rewrite == 'function') { audioplayer_rewrite(); } 4 if (typeof videoplayer_rewrite == 'function') { videoplayer_rewrite(); } 5 if (typeof youtubevideo_rewrite == 'function') { youtubevideo_rewrite(); } 6 if (typeof vimeovideo_rewrite == 'function') { vimeovideo_rewrite(); } 7 if (typeof initLightbox == 'function') { initLightbox(); } 8 if (typeof left_menu_resize == 'function') { left_menu_resize(); } 9 if (typeof webcam == 'function') { 10 var cam_interval = 20000; 11 //var camurl = '/soundstatus/get_campic.php'; 12 //window.setInterval('webcam(\'' + camurl + '\')', cam_interval); 13 //webcam(camurl); 14 window.setInterval('webcam()', cam_interval); 15 webcam(); 16 } 17 //var ts = Math.floor(getTime()/20); 18 var infourl = '/soundstatus/info.php'; 19 var interval = 5000; 20 //var url = '/soundstatus/info' + '?' + Math.floor((new Date()).getTime() / 20000 ); 21 window.setInterval('getInfo(\'' + infourl + '\')', interval); 22 getInfo(infourl); 23 } 24 25 function getInfo(url) { 26 new Ajax.Request(url, { 27 method: 'get', 28 //parameters: {random: Math.floor((new Date()).getTime() / 20000 )}, 29 onSuccess: function(transport) { 30 var json = transport.responseText.evalJSON(true); 31 var spacer = '0'; 32 var max_len = 80; 33 var string = ''; 34 var act_song = ''; 35 var act_artist = ''; 36 var act_title = ''; 37 var ext_artist = ''; 38 var ext_title = ''; 39 var ext_album = ''; 40 var ext_image = ''; 41 var image = ''; 42 var cover = ''; 43 var summary = ''; 44 var mql = window.matchMedia("(max-width: 800px)"); 45 if ( mql.matches ) { max_len = 70; } 46 var mql = window.matchMedia("(max-width: 400px)"); 47 if ( mql.matches ) { max_len = 60; } 48 var max_chars = max_len - 4; 49 if(json.title.length > 0) { 50 string = json.title + string; 51 act_title = json.title.replace("<","<"); 52 ext_title = json.title.replace("<","<"); 53 if ( json.title.length > max_len ) { act_title = act_title.substring(0,max_chars) + "..."; } 54 if(json.artist.length > 0) { 55 string = json.artist + ' - ' + string; 56 act_artist = json.artist; 57 ext_artist = json.artist; 58 if ( json.artist.length > max_len ) { act_artist = act_artist.substring(0,max_chars) + "..."; } 59 } 60 if(json.album.length > 0) { 61 ext_album = json.album; 62 string = string + ' (' + json.album + ')'; } 63 } 64 65 if (json.artist.length == 0) { if (json.album.length == 0) { if (json.title.length == 0) { spacer = '0'; string = '<i>no Streaminfos available</i>';} } } 66 67 68 act_song = '<div style="color: 222222; margin-top: ' + spacer + 'px;">' + string + '</div>'; 69 if (json.image.length > 0) { image = '<img alt="Bild des Künstlers" src="' + json.image + '" /> '; /* ext_image = ext_image + image; */ } 70 if (json.cover.length > 0) { cover = '<img alt="Album-Cover" src="' + json.cover + '" /> '; ext_image = ext_image + cover; } 71 summary = json.summary + ' ...'; 72 73 //$('actualsong').innerHTML = act_song; 74 75 if ( document.getElementById('actualartist').innerHTML != act_artist ) { 76 document.getElementById('actualartist').innerHTML = act_artist; 77 } 78 if ( document.getElementById('actualtitle').innerHTML != act_title ) { 79 document.getElementById('actualtitle').innerHTML = act_title; 80 } 81 82 if ( document.getElementById('artist_image').innerHTML != image ) { 83 document.getElementById('artist_image').innerHTML = image; 84 } 85 86 if ( document.getElementById('album_image').innerHTML != cover ) { 87 document.getElementById('album_image').innerHTML = cover; 88 } 89 90 if ( document.getElementById('artist_summary').innerHTML != summary ) { 91 document.getElementById('artist_summary').innerHTML = summary; 92 } 93 94 if ( document.getElementById('ext_artist').innerHTML != ext_artist ) { 95 document.getElementById('ext_artist').innerHTML = ext_artist; 96 } 97 98 if ( document.getElementById('ext_title').innerHTML != ext_title ) { 99 document.getElementById('ext_title').innerHTML = ext_title; 100 } 101 102 if ( document.getElementById('ext_album').innerHTML != ext_album ) { 103 document.getElementById('ext_album').innerHTML = ext_album; 104 } 105 106 if ( document.getElementById('ext_image').innerHTML != ext_image ) { 107 document.getElementById('ext_image').innerHTML = ext_image; 108 } 109 110 111 } 112 }); 113 114 } 115
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.