PageSourceSearch

https://johnparr.net/js/thebestsampleplayer.js

js johnparr.net collected 2026-10-02 14:05:39 UTC 5,473 bytes, 183 lines download raw bytes

1// JavaScript Document
2
3
4//----Start
5
6$(document).ready(function start() {
7	var abc=$.browser.version;
8	
9	if ( $.browser.msie && abc<9 ) { 
10}
11else
12{	
13    
14	$("#sample_player_noscript").remove();
15	
16	$("#sample_player").html('<audio id="best-player" name="best-player"><source src="music/music_samples/thebestrock_sample2.mp3" /><source src="music/music_samples/thebestrock_sample.ogg" /></audio><a id="bestsample" href="#null"><div class="ctrl_button"><img src="commonimages/play.jpg"/></div><!--end of sale_image--><div class="player_text"><p>Click To Play Sample</p></div><!--end of player_text--></a>');
17	
18	$("#sample_player_noscript_mos").remove();
19	
20	$("#sample_player_mos").html('<audio id="mos-player" name="mos-player"><source src="music/music_samples/man_of_steel_sample.mp3" /><source src="music/music_samples/man_of_steel_sample.ogg" /></audio><a id="mossample" href="#null"><div class="ctrl_button_mos"><img src="commonimages/play.jpg"/></div><!--end of sale_image--><div class="player_text_mos"><p>Click To Play Sample</p></div><!--end of player_text--></a>');
21	
22	$("#sample_player_noscript_roast").remove();
23	
24	$("#sample_player_roast").html('<audio id="roast-player" name="roast-player"><source src="music/music_samples/st_elmos_rob_lowe.mp3" /></audio><a id="roastsample" href="#null"><div class="ctrl_button_roast"><img src="commonimages/play.jpg"/></div><!--end of sale_image--><div class="player_text_roast"><p>Click To Play Roast</p></div><!--end of player_text--></a>');
25	
26	controller();
27	
28}
29	
30});
31
32
33//---Controller
34function controller(){
35	
36	$("#bestsample").click(function() {
37		console.log("The best sampler - play");
38        
39		$("#best-player")[0].play();
40	
41//	$("#sample_player").html('');
42		$(".ctrl_button").html('<a id="bestsamplestop" href="#null">						<img src="commonimages/stop.jpg"/></a>');
43	
44		$(".player_text").html('<a id="bestsamplestopb" href="#null"><p>Playing - Click To Stop</p></a>');
45	
46		stop();
47    });
48	
49	$("#mossample").click(function() {
50		console.log("Man of steel - play");
51        
52		$("#mos-player")[0].play();
53		console.log("Play Mos .mp3");
54	
55//	$("#sample_player").html('');
56		$(".ctrl_button_mos").html('<a id="mossamplestop" href="#null"><img src="commonimages/stop.jpg"/></a>');
57		console.log(".ctr_botton_moss / id = mossamplestop");
58	
59		$(".player_text_mos").html('<a id="mossamplestopb" href="#null"><p>Playing - Click To Stop</p></a>');
60		
61		console.log(".player_text_mos / id = mossamplestopb");
62		
63	
64	stop();
65    });
66	
67	
68	$("#roastsample").click(function() {
69		console.log("St Elmos Roast - play");
70        
71		$("#roast-player")[0].play();
72		console.log("Play Roast .mp3");
73	
74//	$("#sample_player").html('');
75		$(".ctrl_button_roast").html('<a id="roastsamplestop" href="#null"><img src="commonimages/stop.jpg"/></a>');
76		console.log(".ctr_botton_roast / id = roastsamplestop");
77	
78		$(".player_text_roast").html('<a id="roastsamplestopb" href="#null"><p>Playing - Click To Stop</p></a>');
79		
80		console.log(".player_text_roast / id = roastsamplestopb");
81		
82	
83	stop();
84    });
85	
86	
87}
88
89
90//---Stop
91function stop(){
92	
93$("#bestsamplestop").click(function() {
94
95	$("#best-player")[0].pause();
96	$("#best-player")[0].currentTime = 0;
97	
98	$("#sample_player").html('');	
99
100	restart();
101		
102	});	
103	
104	$("#mosssamplestop").click(function() {
105
106	$("#mos-player")[0].pause();
107	$("#mos-player")[0].currentTime = 0;
108	
109	$("#sample_player_mos").html('');	
110
111	restart();
112		
113	});	
114	
115	
116	$("#roastsamplestop").click(function() {
117
118	$("#roast-player")[0].pause();
119	$("#roast-player")[0].currentTime = 0;
120	
121	$("#sample_player_roast").html('');	
122
123	restart();
124		
125	});
126	
127	
128$("#bestsamplestopb").click(function() {
129
130	$("#best-player")[0].pause();
131	$("#best-player")[0].currentTime = 0;
132	
133	$("#sample_player").html('');
134	
135	restart();
136	
137	});	
138	
139	$("audio").on("ended", function() { 
140    	
141		$("#sample_player").html('');
142		$("#sample_player_mos").html('')	
143		
144		restart();
145	
146	});
147	
148	$("#mossamplestopb").click(function() {
149
150	$("#mos-player")[0].pause();
151	$("#mos-player")[0].currentTime = 0;
152	
153	$("#sample_player_mos").html('');
154	
155	restart();
156	
157	});	
158	
159	$("audio").on("ended", function() { 
160    	
161		$("#sample_player").html('');
162		$("#sample_player_mos").html('');	
163		
164		restart();
165	
166	});
167
168}
169
170
171
172//--Restart
173function restart(){
174	
175	$("#sample_player").html('<audio id="best-player" name="best-player"><source src="music/music_samples/thebestrock_sample.mp3" /><source src="music/music_samples/thebestrock_sample.ogg" /></audio><a id="bestsample" href="#null"><div class="ctrl_button"><img src="commonimages/play.jpg"/></div><!--end of sale_image--><div class="player_text"><p>Click To Play Sample</p></div><!--end of player_text--></a>');
176	
177	$("#sample_player_mos").html('<audio id="mos-player" name="mos-player"><source src="music/music_samples/man_of_steel_sample2.mp3" /><source src="music/music_samples/man_of_steel_sample.ogg" /></audio><a id="mossample" href="#null"><div class="ctrl_button_mos"><img src="commonimages/play.jpg"/></div><!--end of sale_image--><div class="player_text_mos"><p>Click To Play Sample</p></div><!--end of player_text--></a>');
178	
179	$("#sample_player_roast").html('<audio id="roast-player" name="roast-player"><source src="music/music_samples/st_elmos_rob_lowe.mp3" /></audio><a id="roastsample" href="#null"><div class="ctrl_button_roast"><img src="commonimages/play.jpg"/></div><!--end of sale_image--><div class="player_text_roast"><p>Click To Play Roast</p></div><!--end of player_text--></a>');
180	
181	controller();
182	
183}

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.