PageSourceSearch

https://www.parsifal.it/templates/dd_blikomobile_107/js/custom.js?version=?version=1.0.1325483142109

js parsifal.it collected 2026-10-08 23:07:54 UTC 15,822 bytes, 436 lines download raw bytes

1//$(document).ready(function() {
2jQuery(document).ready(function(){
3
4  function iFrameCheck() {
5    var myRequest = new Request(titleframe);
6    //console.log(titleframe);
7    fetch(myRequest).then(function(response) {
8      //  console.log(response.status); // returns 200
9      document.getElementById("loadertitle").style.display = "none";
10      if(response.status == '200'){
11        console.log(response.status);
12        document.getElementById("blockrandom-161").src = titleframe;
13        document.getElementById("blockrandom-161").style.display = "inline";
14      } else {
15        console.log(response.status);
16      }
17    }).catch(function(error) {
18    //console.log(error);
19    });
20  } 
21
22
23  iFrameCheck();
24
25  function gorss1(){
26    jQuery('#rss02').css('display','block');
27    if (window.matchMedia('(max-width: 767px)').matches){
28      jQuery("#headlineMarquee_100").marquee({"duration":"3000","direction":"left","pauseOnHover":false,"startVisible":false});
29    } else {
30      jQuery("#headlineMarquee_100").marquee({"duration":"8000","direction":"left","pauseOnHover":false,"startVisible":false});
31    }  
32  }
33  
34  if(location.toString().indexOf('/magazine') != -1){
35    setTimeout(gorss1, 1000);
36  }
37
38  jQuery("#img-vgv1, #img-vgv2, #img-vgv3").hover(
39    function(){
40      jQuery(this).animate({width: "103%", height: "300px"});
41    },
42    function(){
43      jQuery(this).animate({width: "100%", height: "280px"});
44    }
45  );   
46
47  // Smooth scrolling
48  //$(function() {
49  jQuery(function ($) {
50    $('a[href*="#"]:not([href="#"])').click(function() {
51      if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
52        var target = $(this.hash);
53        target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
54          
55        if (target.length) {
56          $('html, body').animate({
57            scrollTop: target.offset().top
58          }, 1000, 'easeInOutExpo');
59            
60          if ( $(this).parents('.nav-menu').length ) {
61            $('.nav-menu .menu-active').removeClass('menu-active');
62            $(this).closest('li').addClass('menu-active');
63          }
64
65          if ( $('body').hasClass('mobile-nav-active') ) {
66            $('body').removeClass('mobile-nav-active');
67            $('#mobile-nav-toggle i').toggleClass('fa-times fa-bars');
68            $('#mobile-body-overly').fadeOut();
69          }
70          return false;
71        }
72      }
73    });
74
75    //RADIO & TV
76    var audioElem = document.getElementById("playeraudio");
77    var playRadioButton = document.getElementById("ASCOLTA");
78    playRadioButton.addEventListener("click", handlePlayButtonRadio, false);
79
80    focus();
81
82    const controller = new AbortController();
83    const { signal } = controller;
84
85    const listener = window.addEventListener('blur', () => {
86      //if (document.activeElement === document.querySelector('iframe')) {
87      if (document.activeElement === document.getElementById("blockrandom-161")) {
88        // console.log('clicked on iframe');
89        handlePlayButtonRadio();
90        setTimeout(function() { 
91          focus();
92        },500);
93      }
94      window.removeEventListener('blur', listener);
95    });
96
97    createVideoPlayer();
98
99    var videoElem = videojs('vid1');
100    var playTvButton = document.getElementById("GUARDA");
101    playTvButton.addEventListener("click", handlePlayButtonTv, false);
102      
103    $('audio').mediaelementplayer({
104      startVolume:1,
105      alwaysShowControls: true,
106      iPadUseNativeControls: false,
107      iPhoneUseNativeControls: false,
108      success: function(media, node, player) {
109        $('#' + node.id + '-mode').html('mode: ' + media.pluginType);
110      }
111    }); 
112
113    function handlePlayButtonRadio() {
114      if (document.pictureInPictureElement) {
115        document.exitPictureInPicture();
116      } 
117
118      if (audioElem.paused) { 
119        //if (videoElem.paused()) {
120        //} else {
121            //document.getElementById("main").style.display = "none";
122            //videoElem.pause();
123            //handlePlayButtonTv();
124            //videoElem.pause();
125            //videoElem.removeAttribute('src'); // empty source
126            //videoElem.load();
127            //videoElem.dispose();
128        var timeout = setTimeout(hideVideo, 200);
129            //handlePlayButtonTv();         
130        //}
131        _paq.push(['trackEvent', 'Streaming Radio', 'Ascolta Radio', 'Parsifal']);
132        audioElem.setSrc(AudioUrl);
133        audioElem.play();
134        $("#img-menu-ASCOLTA").attr("src","/images/SISTEMA/icon/radio-on.gif");
135      } else {
136        audioElem.pause();
137        //audioElem.setSrc('');
138        $("#img-menu-ASCOLTA").attr("src","/images/SISTEMA/icon/ascolta.png");
139      } 
140    }
141    audioElem.addEventListener('error', event => {
142      //console.log(error);
143      //const error = event.path[0].error;
144      //alert(error.message);
145      //document.getElementById("main").style.display = "block";
146      //var errorelems = document.getElementsByClassName("errorelem");
147      //var videobox = document.getElementsByClassName("videoBox");
148      //videobox[0].style.display = "none"; // show 
149      // errorelems[0].style.display = "block"; // show
150      setTimeout(function() {
151        //document.getElementById("main").style.display = "none";
152        //audioElem.setSrc('');
153        $("#img-menu-ASCOLTA").attr("src","/images/SISTEMA/icon/ascolta.png");
154      },3000); 
155    }, true);
156
157    //var video = document.querySelector("vid1");
158    //var video = document.querySelector('video');
159    var video = document.querySelector('.vjs-tech');
160    video.addEventListener("leavepictureinpicture", onExitPip, false);
161    video.addEventListener("enterpictureinpicture", onEnterPip, false);
162
163
164    function onExitPip() {
165      console.log("Picture-in-Picture mode deactivated!");
166      //controller.abort();
167    }
168
169    function onEnterPip() {
170      console.log("Picture-in-Picture mode activated!");
171      //video.addEventListener('pause', () => video.play(), { signal
172      //video.play();
173      //});
174    video.addEventListener('pause', () => video.play(), { once: true });
175    }
176
177    function hideVideo() {
178      videoElem.pause();
179      document.getElementById("main").style.display = "none";
180    }  
181
182
183    function handlePlayButtonTv() {
184      //videoElem.src(VideoUrl);
185      //var errorelems = document.getElementsByClassName("errorelem");
186      //var videobox = document.getElementsByClassName("videoBox");
187      //errorelems[0].style.display = "none"; // show 
188      //videobox[0].style.display = "block"; // show 
189
190      //var doesitSupportPip = document.pictureInPictureEnabled;
191
192      //if(doesitSupportPip){
193        if (document.pictureInPictureElement) {
194          document.exitPictureInPicture();
195          var timeout = setTimeout(hideVideo, 200);      
196        } 
197      //}
198    
199      if (videoElem.paused()) {
200        //openFullscreen();
201        videoElem.src(VideoUrl);
202        if (audioElem.paused) {
203        } else {
204          $("#img-menu-ASCOLTA").attr("src","/images/SISTEMA/icon/ascolta.png");  
205          audioElem.pause();
206          //audioElem.setSrc('');
207        }
208        _paq.push(['trackEvent', 'Streaming TV', 'Guarda TV', 'Parsifal']);
209
210
211        // Check if the device is a SmartTV
212        if(is.SmartTV()){
213            console.log('This is a SmartTV device!');
214            var elemvideo = document.getElementById("vid1");
215            elemvideo.requestFullscreen();
216        }else{
217            console.log('This is not a SmartTV device.');
218        }
219
220
221        videoElem.load();
222        videoElem.play();
223
224        if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
225          //$('body').css({
226          //   "-webkit-transform": "rotate(90deg)"
227          // });
228          //document.body.requestFullscreen().then(res=>console.log(res)).catch(err=>console.log(err));
229          screen.orientation.unlock();
230          //document.documentElement.requestFullscreen();
231          screen.orientation.lock('landscape').then(res=>console.log(res)).catch(err=>console.log(err));
232        }
233        document.getElementById("main").style.display = "block";
234
235/*        if(is.SmartTV()){
236            console.log('This is a SmartTV device!');
237            var elemvideo = document.getElementById("vid1");
238            elemvideo.requestFullscreen("show");
239        }else{
240            console.log('This is not a SmartTV device.');
241        }
242*/
243
244      } else {
245        if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
246          //$('body').css({
247          //  "-webkit-transform": "rotate(90deg)"
248          //});
249          //document.body.exitFullscreen().then(res=>console.log(res)).catch(err=>console.log(err));
250          //document.exitFullscreen();
251          screen.orientation.unlock();
252          screen.orientation.lock('natural').then(res=>console.log(res)).catch(err=>console.log(err));
253        }
254        var timeout = setTimeout(hideVideo, 200);
255      }
256
257      //$('#main').on('click','.overlayTV, .closeTV', function() {
258      $('#main').on('click','.closeTV', function() {
259        //$('.overlay').remove();
260        //     $('#main').slideUp("fast");
261        document.getElementById("main").style.display = "none";
262        videoElem.pause();
263        setTimeout(() => { videoElem.pause() }, 500);
264        //closeFullscreen();
265        if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
266          //$('body').css({
267          //  "-webkit-transform": "rotate(90deg)"
268          //});
269          //document.body.exitFullscreen().then(res=>console.log(res)).catch(err=>console.log(err));
270          //document.exitFullscreen();
271          screen.orientation.unlock();
272          screen.orientation.lock('natural').then(res=>console.log(res)).catch(err=>console.log(err));
273        }
274      });
275    
276      video.addEventListener('error', event => {
277        //console.log(error);
278        //const error = event.path[0].error;
279        //alert(error.message);
280        var errorelems = document.getElementsByClassName("errorelem");
281        var videobox = document.getElementsByClassName("videoBox");
282        videobox[0].style.display = "none"; // show 
283        errorelems[0].style.display = "block"; // show
284        setTimeout(function() {
285          if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
286            //$('body').css({
287            //  "-webkit-transform": "rotate(90deg)"
288            //});
289            //document.body.exitFullscreen().then(res=>console.log(res)).catch(err=>console.log(err));
290            //document.exitFullscreen();
291            screen.orientation.unlock();
292            screen.orientation.lock('natural').then(res=>console.log(res)).catch(err=>console.log(err));
293          } 
294          hideVideo();
295        },3000); 
296      }, true);
297              
298      video.addEventListener('playing', event => {
299        var errorelems = document.getElementsByClassName("errorelem");
300        var videobox = document.getElementsByClassName("videoBox");
301        var videoDiv = document.getElementById('liveTV');
302        videobox[0].style.display = "block"; // show 
303        errorelems[0].style.display = "none"; // show
304        //videoDiv.style.display = "block"; // show 
305      }, true);
306
307      video.addEventListener('enterpictureinpicture', () => {
308        //pipActive = true;
309        document.getElementById("main").style.display = "none";
310      });
311
312      video.addEventListener('leavepictureinpicture', () => {
313        //pipActive = false;
314        document.getElementById("main").style.display = "block";
315      });
316
317
318    if(is.SmartTV()){
319      videojs('vid1').on('fullscreenchange', function() {
320        //console.log('fullscreenchange event fired!');
321        //console.log(videojs('vid1').isFullscreen());
322        if(videojs('vid1').isFullscreen() == false){
323          hideVideo();
324        } 
325      });
326    }   
327
328
329    }  
330
331
332
333    function createVideoPlayer() {
334      var videoDiv = document.getElementById('liveTV');
335      var video = document.createElement('video-js');
336      var source = document.createElement('source');
337      video.id = 'vid1';
338      video.className = 'vjs-default-skin';
339      video.setAttribute('controls', '');
340      //video.setAttribute('muted', '<?php //echo $ismuted; ?>'); 
341      //video.setAttribute('autoplay', 'autoplay');
342      video.setAttribute('preload', 'auto');
343      video.setAttribute('style', 'width: 100%;height: 100%;position: unset !important;');
344      source.setAttribute('src', VideoUrl);
345      source.setAttribute('type', 'application/x-mpegURL');
346
347      videoDiv.appendChild(video);
348      //videoElem[0].style.display = "block"; // hide
349      //videoDiv.style.display = "none"; // hide     
350      //video.appendChild(source);
351      //videojs("vid1", {}, function(){
352      //});
353    }
354
355    var elem = document.documentElement;
356    function openFullscreen() {
357      if (elem.requestFullscreen) {
358        elem.requestFullscreen();
359      } else if (elem.webkitRequestFullscreen) { /* Safari */
360        elem.webkitRequestFullscreen();
361      } else if (elem.msRequestFullscreen) { /* IE11 */
362        elem.msRequestFullscreen();
363      }
364    }
365
366    function closeFullscreen() {
367      if (document.exitFullscreen) {
368        document.exitFullscreen();
369      } else if (document.webkitExitFullscreen) { /* Safari */
370        document.webkitExitFullscreen();
371      } else if (document.msExitFullscreen) { /* IE11 */
372        document.msExitFullscreen();
373      }
374    }
375
376  });
377
378  // Counting numbers
379  jQuery(function ($) {
380    $('[data-toggle="counter-up"]').counterUp({
381      delay: 10,
382      time: 1000
383    });
384
385    // jQuery counterUp
386    if(jQuery().counterUp) {
387      $('[data-counter-up]').counterUp({
388        delay: 20,
389      });
390    }
391  }); 
392
393});
394
395document.addEventListener('DOMContentLoaded', function () {
396 window.AddToHomeScreenInstance = new window.AddToHomeScreen({
397  appName: 'Radio Parsifal',                                   // Name of the app.
398                                                         // Required.
399  appIconUrl: '/templates/dd_blikomobile_107/images/favicon/apple-touch-icon.png',                    // App icon link (square, at least 40 x 40 pixels).  
400                                                         // Required.
401  assetUrl: '/templates/dd_blikomobile_107/images/addtohome/',  // Link to directory of library image assets.
402
403  maxModalDisplayCount: 6                                // If set, the modal will only show this many times.
404	                                                      // Optional. Default: -1 (no limit).  (Debugging: Use this.clearModalDisplayCount() to reset the count)
405});     
406  ret = window.AddToHomeScreenInstance.show('it');        // show "add-to-homescreen" instructions to user, or do nothing if already added to homescreen
407  //window.AddToHomeScreenInstance.clearModalDisplayCount();   // reset counter for testing                                                     // The only argument is the language to show the messages in (currently only 'de', 'en', 'pt' and 'fr' are available).
408});
409
410/*
411window.onload = function(){
412
413  function e(e) {
414    return e.stopPropagation ? e.stopPropagation() : window.event && (window.event.cancelBubble = !0), e.preventDefault(), !1;
415  }
416  document.addEventListener(
417    "contextmenu",
418    function (e) {
419      e.preventDefault();
420    },
421    !1
422  ),
423    document.addEventListener(
424    "keydown",
425    function (n) {
426      n.ctrlKey && n.shiftKey && 73 == n.keyCode && e(n),
427      n.ctrlKey && n.shiftKey && 74 == n.keyCode && e(n),
428      83 == n.keyCode && (navigator.platform.match("Mac") ? n.metaKey : n.ctrlKey) && e(n),
429      n.ctrlKey && 85 == n.keyCode && e(n),
430      123 == n.keyCode && e(n);
431    },
432    !1
433  );  
434
435};
436*/

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.