PageSourceSearch

https://www.kyticesvetla.cz/moduly_sablony/kultura_v1/cz/3177/463/grt-youtube-popup.js?ver=

js kyticesvetla.cz collected 2026-09-25 00:08:58 UTC 1,825 bytes, 58 lines download raw bytes

1/*!
2 * GRT Youtube Popup - jQuery Plugin
3 * Version: 1.0
4 * Author: GRT107
5 *
6 * Copyright (c) 2017 GRT107
7 * Released under the MIT license
8*/
9
10(function ( $ ) {
11
12	$.fn.grtyoutube = function( options ) {
13
14		return this.each(function() {
15
16			// Get video ID
17			var getvideoid = $(this).attr("youtubeid");
18
19			// Default options
20			var settings = $.extend({
21				videoID: getvideoid,
22				autoPlay: true,
23				theme: "dark"
24			}, options );
25
26			// Convert some values
27			if(settings.autoPlay === true) { settings.autoPlay = 1 } else if(settings.autoPlay === false)  { settings.autoPlay = 0 }
28			if(settings.theme === "filmove_predstavenie") { settings.theme = "grtyoutube-filmove_predstavenie-theme" } else if(settings.theme === "divadlo")  { settings.theme = "grtyoutube-divadlo-theme" } else if(settings.theme === "ostatne")  { settings.theme = "grtyoutube-ostatne-theme" }
29
30			// Initialize on click
31			if(getvideoid) {
32				$(this).on( "click", function() {
33					 $("body").append('<div class="grtyoutube-popup '+settings.theme+'">'+
34								'<div class="grtyoutube-popup-content">'+
35									'<span class="grtyoutube-popup-close"></span>'+
36									'<iframe class="grtyoutube-iframe" src="https://www.youtube.com/embed/'+settings.videoID+'?rel=0&wmode=transparent&autoplay='+settings.autoPlay+'&showinfo=0&iv_load_policy=3" allowfullscreen frameborder="0" allow="autoplay; fullscreen"></iframe>'+
37								'</div>'+
38							'</div>');
39				});
40			}
41
42			// Close the box on click or escape
43			$(this).on('click', function (event) {
44				event.preventDefault();
45				$(".grtyoutube-popup-close, .grtyoutube-popup").click(function(){
46					$(".grtyoutube-popup").remove();
47				});
48			});
49
50			$(document).keyup(function(event) {
51				if (event.keyCode == 27){
52					$(".grtyoutube-popup").remove();
53				}
54			});
55		});
56	};
57
58}( jQuery ));

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.