vendor: 4,402 bytes, lines 1-130
1(function ($) { 2 "use strict"; 3 4 //Shortcut for fancyBox object 5 var F = $.fancybox, 6 format = function (url, rez, params) { 7 params = params || ''; 8 9 if ($.type(params) === "object") { 10 params = $.param(params, true); 11 } 12 13 $.each(rez, function (key, value) { 14 url = url.replace('$' + key, value || ''); 15 }); 16 17 if (params.length) { 18 url += ( url.indexOf('?') > 0 ? '&' : '?' ) + params; 19 } 20 21 return url; 22 }; 23 24 //Add helper object 25 F.helpers.media = { 26 defaults: { 27 youtube: { 28 matcher: /(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(watch\?v=|v\/|u\/|embed\/?)?(videoseries\?list=(.*)|[\w-]{11}|\?listType=(.*)&list=(.*)).*/i, 29 params: { 30 autoplay: 1, 31 autohide: 1, 32 fs: 1, 33 rel: 0, 34 hd: 1, 35 wmode: 'opaque', 36 enablejsapi: 1 37 }, 38 type: 'iframe', 39 url: '//www.youtube.com/embed/$3' 40 }, 41 vimeo: { 42 matcher: /(?:vimeo(?:pro)?.com)\/(?:[^\d]+)?(\d+)(?:.*)/, 43 params: { 44 autoplay: 1, 45 hd: 1, 46 show_title: 1, 47 show_byline: 1, 48 show_portrait: 0, 49 fullscreen: 1 50 }, 51 type: 'iframe', 52 url: '//player.vimeo.com/video/$1' 53 }, 54 metacafe: { 55 matcher: /metacafe.com\/(?:watch|fplayer)\/([\w\-]{1,10})/, 56 params: { 57 autoPlay: 'yes' 58 }, 59 type: 'swf', 60 url: function (rez, params, obj) { 61 obj.swf.flashVars = 'playerVars=' + $.param(params, true); 62 63 return '//www.metacafe.com/fplayer/' + rez[1] + '/.swf'; 64 } 65 }, 66 dailymotion: { 67 matcher: /dailymotion.com\/video\/(.*)\/?(.*)/, 68 params: { 69 additionalInfos: 0, 70 autoStart: 1 71 }, 72 type: 'swf', 73 url: '//www.dailymotion.com/swf/video/$1' 74 }, 75 twitvid: { 76 matcher: /twitvid\.com\/([a-zA-Z0-9_\-\?\=]+)/i, 77 params: { 78 autoplay: 0 79 }, 80 type: 'iframe', 81 url: '//www.twitvid.com/embed.php?guid=$1' 82 }, 83 twitpic: { 84 matcher: /twitpic\.com\/(?!(?:place|photos|events)\/)([a-zA-Z0-9\?\=\-]+)/i, 85 type: 'image', 86 url: '//twitpic.com/show/full/$1/' 87 }, 88 instagram: { 89 matcher: /(instagr\.am|instagram\.com)\/p\/([a-zA-Z0-9_\-]+)\/?/i, 90 type: 'image', 91 url: '//$1/p/$2/media/?size=l' 92 }, 93 google_maps: { 94 matcher: /maps\.google\.([a-z]{2,3}(\.[a-z]{2})?)\/(\?ll=|maps\?)(.*)/i, 95 type: 'iframe', 96 url: function (rez) { 97 return '//maps.google.' + rez[1] + '/' + rez[3] + '' + rez[4] + '&output=' + (rez[4].indexOf('layer=c') > 0 ? 'svembed' : 'embed'); 98 } 99 } 100 }, 101 102 beforeLoad: function (opts, obj) { 103 var url = obj.href || '', 104 type = false, 105 what, 106 item, 107 rez, 108 params; 109 110 for (what in opts) { 111 if (opts.hasOwnProperty(what)) { 112 item = opts[ what ]; 113 rez = url.match(item.matcher); 114 115 if (rez) { 116 type = item.type; 117 params = $.extend(true, {}, item.params, obj[ what ] || ($.isPlainObject(opts[ what ]) ? opts[ what ].params : null)); 118 119 url = $.type(item.url) === "function" ? item.url.call(this, rez, params, obj) : format(item.url, rez, params); 120 121 break; 122 } 123 } 124 } 125 126 if (type) { 127 obj.href = url; 128 obj.type = type; 129 130 obj.autoHeight = false;
131 } 132 } 133 }; 134 135}(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.