PageSourceSearch

https://bezdroza.pl/assets/helion/js/player.js?version=2

js bezdroza.pl collected 2026-09-25 23:50:39 UTC 4,230 bytes, 147 lines download raw bytes

1
2/* audioPlayer plugin. Use it smartly
3
4
5    */
6
7$(document).ready(function(){
8
9    //$(".jp-pause").hide();
10
11    $("li.type-book-click, li.type-ebook-click").on("click", function(event) { // RG 20.09.2022 przez dodanie playera na stronach kategorii/promocji dodajemy "li", �eby nie blokowa� filtr�w
12	  event.preventDefault();
13	  $(this).parent().parent().find(".cover.audioCover").css("cssText","height: 218px !important");
14	  $(this).parent().parent().find(".audiobookOkladka").css("cssText","height: 218px !important;width:147px!important;");
15	  $(this).parent().parent().find(".book-type").removeClass("mod");
16	  $(this).parent().parent().find(".jp-audio").hide();
17	  return true;
18
19    });
20
21
22    $("li.type-audiobook, li.type-dvd, li.type-audiobook-click").on("click", function(event) { // RG 20.09.2022 przez dodanie playera na stronach kategorii/promocji dodajemy "li", �eby nie blokowa� filtr�w | 21.09.2022 dodanie type-dvd
23
24	  event.preventDefault();
25
26	  $(this).parent().parent().find(".cover.audioCover").css("cssText","height: 145px !important");
27
28
29	  $(this).parent().parent().find(".audiobookOkladka").css("cssText","height:145px!important;width:145px!important;");
30
31	  $(this).parent().parent().find(".book-type").addClass("mod");
32	  $(this).parent().parent().find(".jp-audio").show();
33	  return true;
34
35    });
36
37// kod odpowiedzialny za dzialanie playera
38//
39//
40//
41
42$(".jp-stop").hide();
43
44$("button.jp-play").click(function(e){
45	e.preventDefault();
46//	var btn = $(this).attr("class");
47
48    //if( btn  == "jp-play") {
49 
50	   var id_jp_audio = $(this).parent().parent().parent().parent().parent().parent().children('.jp-audio').attr("id"); //uzywane
51	   var jquery_player = $(this).parent().parent().parent().parent().parent().parent().children('.jp-jplayer').attr("id"); //uzywane
52	   var srcAudio = $(this).parent().parent().parent().parent().parent().parent().children('.player').text(); //uzywane
53	   var button_player = $(this).attr("id"); //uzywane
54
55	    $("#"+jquery_player).jPlayer( {
56		  ready: function(event){
57		     if($.jPlayer.event.play === 'jPlayer_play'){
58			$(this).jPlayer("setMedia", { mp3: "https://pdf.helion.pl/"+srcAudio});
59			$(this).jPlayer("pauseOthers");
60			$(this).jPlayer("play");
61		     }
62		  },
63		  cssSelectorAncestor: "#"+id_jp_audio,
64		  cssSelector: {
65		     play:        "#"+button_player,
66		     pause:       "#"+button_player,
67             stop:        "#"+button_player,
68             pause:        ".jp-pause",
69		     stop:         ".jp-stop",
70             currentTime: ".jp-current-time",
71		     gui:         ".jp-gui"
72
73		     },
74
75		     preload: "none",
76		     supplied: "mp3",
77		     errorAlerts: false,
78		     warningAlerts: false
79	    }).bind($.jPlayer.event.play, function(e) { // pause other instances of player when current one play
80
81		  $(this).jPlayer("pauseOthers");
82		  $(this).jPlayer("play");
83          $(".jp-stop").not(this).hide();     
84	    });
85
86    // $('#'+button_player).html("Ods�uchaj");
87	$('#'+button_player+'.jp-play').html("");
88
89     //$('#'+button_player+'.jp-play').html("Ods�uchaj");
90     $(".jp-stop").hide();
91     $('.jp-play').not(this).html("Odsłuchaj");
92     
93	 //$("#"+jquery_player).jPlayer("play");
94	 //$(this).removeClass("jp-play").addClass("jp-stop").html("Stop");
95
96	 //$(".jp-stop").not(this).removeClass("jp-stop").addClass("jp-play").html("Ods�uchaj");
97
98	 $(".jp-current-time").not(this).hide();
99	 $(this).parent().prev(".jp-current-time").show();
100
101	 return false;
102    /*  
103    } else {
104
105	 $(this).removeClass("jp-stop").addClass("jp-play").html("Ods�uchaj");
106	 $("#"+jquery_player).jPlayer("stop");
107	 $(this).parent().next(".jp-current-time").hide();
108	 return false;
109      }
110    */
111
112    });
113
114$("button.jp-play").click(function(e){
115    $(".jp-stop").hide();
116});
117
118$("button.jp-pause").click(function(e){
119    
120    var button_player = $(this).attr("id");
121    
122    $('#'+button_player+'.jp-play').show();
123    $('#'+button_player).html("");
124    
125    return false;
126
127});
128
129
130$("button.jp-stop").click(function(e) {
131    $(".jp-stop").hide();
132
133    $(this).jPlayer("pause", 0);
134    return false;
135
136});
137
138
139
140    $.fn.extend({
141
142	  audioPlayer :  function() {
143	}// audioPlayer method
144    }); // fn.extend
145
146
147}); // document ready

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.