PageSourceSearch

https://thefoiegras.co.uk/assets/lefoiegras/js/vendor/jquery.social.stream.1.5.17.js

js thefoiegras.co.uk collected 2026-10-03 00:53:23 UTC 42,247 bytes, 1,228 lines download raw bytes

1/*
2 * DC jQuery Social Stream
3 * Copyright (c) 2013 Design Chemical
4 * http://www.designchemical.com/blog/index.php/premium-jquery-plugins/jquery-social-stream-plugin/
5 * Version 1.5.17 (27-05-2016)
6 *
7 */
8
9(function($){
10
11	SocialStreamObject = function(el, options) {
12		this.create(el, options);
13	};
14
15	$.extend(SocialStreamObject.prototype, {
16
17		version   : '1.5.17',
18
19		create: function(el, options) {
20
21			this.defaults = {
22				feeds: {
23					facebook: {
24						id: '',
25						intro: 'Posted',
26						out: 'intro,thumb,title,text,user,share',
27						text: 'content',
28						comments: 3,
29						image_width: 4, //3 = 600 4 = 480 5 = 320 6 = 180,
30						url: 'facebook.php',
31						feed: 'feed', // feed, posts
32						icon: 'facebook.png'
33					},
34					twitter: {
35						id: '',
36						intro: 'Tweeted',
37						search: 'Tweeted',
38						out: 'intro,thumb,text,share',
39						retweets: false,
40						replies: false,
41						images: '', // large w: 786 h: 346, thumb w: 150 h: 150, medium w: 600 h: 264, small w: 340 h 150
42						url: 'twitter.php',
43						icon: 'twitter.png'
44					},
45					google: {
46						id: '',
47						intro: 'Shared',
48						out: 'intro,thumb,title,text,share',
49						api_key: 'AIzaSyAWNgUpUj_W26tP3yev5Ysr4Zb53OIPgR4',
50						image_height: 75,
51						image_width: 75,
52						shares: true,
53						icon: 'google.png'
54					},
55					youtube: {
56						id: '',
57						intro: 'Uploaded',
58						search: 'Search',
59						out: 'intro,thumb,title,text,user,share',
60						text: 0,
61						api_key: 'AIzaSyB1zptnRspzltRVLGQJMBCH2yYujYp7ytI',
62						thumb: 'medium', //default 120 x 90, medium 320 x 180, high 480 x 360, standard 640 x 480
63						icon: 'youtube.png'
64					},
65					flickr: {
66						id: '',
67						intro: 'Uploaded',
68						out: 'intro,thumb,title,text,share',
69						lang: 'en-us',
70						icon: 'flickr.png'
71					},
72					delicious: {
73						id: '',
74						intro: 'Bookmarked',
75						out: 'intro,thumb,title,text,user,share',
76						icon: 'delicious.png'
77					},
78					pinterest: {
79						id: '',
80						intro: 'Pinned',
81						out: 'intro,thumb,text,user,share',
82						url: 'rss.php',
83						icon: 'pinterest.png'
84					},
85					rss: {
86						id: '',
87						intro: 'Posted',
88						out: 'intro,thumb,title,text,user,share',
89						url: 'https://elevage-gavage.fr/rsso/rss.php',
90						text: 'contentSnippet',
91						icon: 'rss.png'
92					},
93					lastfm: {
94						id: '',
95						intro: 'Listened to,Loved,Replied',
96						out: 'intro,thumb,title,text,user,share',
97						feed: 'recenttracks,lovedtracks,replytracker',
98						icon: 'lastfm.png'
99					},
100					dribbble: {
101						id: '',
102						intro: 'Posted,Liked',
103						out: 'intro,thumb,title,text,user,share',
104						accessToken: '55cab8e9db75df986449fe486fdd46501e4c8d985b7ba6b9a0bfc2d229bc88b3',
105						feed: 'shots,likes',
106						icon: 'dribbble.png'
107					},
108					vimeo: {
109						id: '',
110						intro: 'Liked,Video,Appeared In,Video,Album,Channel,Group',
111						out: 'intro,thumb,title,text,user,share',
112						feed: 'likes,videos,appears_in,all_videos,albums,channels,groups',
113						thumb: 'medium',
114						stats: true,
115						icon: 'vimeo.png'
116					},
117					stumbleupon: {
118						id: '',
119						intro: 'Shared,Reviewed',
120						out: 'intro,thumb,title,text,user,share',
121						feed: 'favorites,reviews',
122						icon: 'stumbleupon.png'
123					},
124					deviantart: {
125						id: '',
126						intro: 'Deviation',
127						out: 'intro,thumb,title,text,user,share',
128						icon: 'deviantart.png'
129					},
130					tumblr: {
131						id: '',
132						intro: 'Posted',
133						out: 'intro,title,text,user,share',
134						thumb: 100,
135						video: 250,
136						icon: 'tumblr.png'
137					},
138					instagram: {
139						id: '',
140					    intro: 'Posted',
141						search: 'Search',
142					    out: 'intro,thumb,text,user,share,meta',
143						accessToken: '',
144						redirectUrl: '',
145						clientId: '',
146						thumb: 'low_resolution',
147						icon: 'instagram.png'
148					}
149				},
150				remove: '',
151				twitterId: '',
152				days: 5,
153				limit: 10,
154				max: 'days',
155				external: true,
156				speed: 600,
157				height: 550,
158				wall: false,
159				centre: false,
160				order: 'date',
161				filter: true,
162				controls: true,
163				rotate: {
164					direction: 'up',
165					delay: 8000
166				},
167				transition: '0.8s',
168				cache: true,
169				container: 'dcsns',
170				cstream: 'stream',
171				content: 'dcsns-content',
172				iconPath: 'images/dcsns-dark/',
173				imagePath: 'images/dcsns-dark/',
174				debug: false
175			};
176
177			this.o = {}, this.timer_on = 0, this.id = 'dcsns-'+$(el).index(), this.timerId = '', this.o = $.extend(true,this.defaults,options), opt = this.o, $load = $('<div class="dcsns-loading">creating stream ...</div>');
178
179			$(el).addClass(this.o.container).append('<div class="'+this.o.content+'"><ul class="'+this.o.cstream+'"></ul></div>');
180
181			var $c = $('.'+this.o.content,el), $a = $('.'+this.o.cstream,el), $l = $('li',$a);
182
183			if(opt.height > 0 && opt.wall == false){
184				$c.css({height:opt.height+'px'});
185			}
186
187			if(this.o.filter == true || this.o.controls == true){
188				var x = '<div class="dcsns-toolbar">';
189				if(this.o.filter == true){
190					var fclass = this.o.center == true ? 'option-set filter dc-center' : 'option-set filter';
191					x += '<ul id="dcsns-filter" class="' + fclass + '">';
192					x += this.o.wall == true ? '<li><a href="#filter" data-group="dc-filter"  data-filter="*" class="selected link-all">all</a></li>' : '' ;
193					var $f = $('.filter',el);
194					$.each(opt.feeds, function(k,v){
195						x += v.id != '' ? '<li class="active f-'+k+'"><a href="#filter" rel="'+k+'" data-group="dc-filter" data-filter=".dcsns-'+k+'"><img src="'+opt.imagePath+opt.feeds[k].icon+'" alt="" /></a></li>' : '' ;
196					});
197					x += '</ul>';
198				}
199				if(this.o.controls == true && opt.wall == false){
200					var play = this.o.rotate.delay <= 0 ? '' : '<li><a href="#" class="play"></a></li>' ;
201					x += '<div class="controls"><ul>'+play+'<li><a href="#" class="prev"></a></li><li><a href="#" class="next"></a></li></ul></div>';
202				}
203				x += '</div>';
204				if(opt.wall == false){
205					$(el).append(x);
206				} else {
207					$(el).before(x);
208				}
209			}
210
211			if(this.o.wall == true){
212				$('.dcsns-toolbar').append($load);
213				var w = $("#dcsns-filter.dc-center").width()/2;
214				$("#dcsns-filter.dc-center").css({'margin-left': -w + "px"}).fadeIn();
215				this.createwall($a);
216			} else {
217				$c.append($load);
218			}
219
220			this.createstream(el,$a,0,opt.days);
221
222			this.addevents(el,$a);
223
224			if(this.o.rotate.delay > 0){
225				this.rotate(el);
226			}
227
228			$load.remove();
229		},
230
231		createstream: function(obj,s,f1,f2){
232			$.each(opt.feeds, function(k,v){
233				if(opt.feeds[k].id != ''){
234					var txt = [];
235					$.each(opt.feeds[k].intro.split(','), function(i,v){
236						v = $.trim(v);
237						txt.push(v);
238					});
239					$.each(opt.feeds[k].id.split(','), function(i,v){
240						v = $.trim(v);
241						if(opt.feeds[k].feed && v.split('#').length < 2){
242							if(k == 'youtube' && v.split('/').length > 1) {
243								getFeed(k,v,opt.iconPath,opt.feeds[k],obj,opt,f1,f2,'posted','',i);
244							} else {
245								$.each(opt.feeds[k].feed.split(','), function(i,feed){
246									getFeed(k,v,opt.iconPath,opt.feeds[k],obj,opt,f1,f2,txt[i],feed,i);
247								});
248							}
249						} else {
250							intro = v.split('#').length < 2 ? opt.feeds[k].intro : opt.feeds[k].search ;
251							getFeed(k,v,opt.iconPath,opt.feeds[k],obj,opt,f1,f2,intro,'',i);
252						}
253					});
254				}
255			});
256		},
257
258		createwall: function(obj){
259				obj.isotope({
260					itemSelector : 'li.dcsns-li',
261					transitionDuration: opt.transition,
262					getSortData : {
263						postDate : function( itemElem ){
264							return parseInt($(itemElem).attr('rel'),10);
265						}
266					},
267					sortBy : 'postDate',
268					masonry: {
269						isFitWidth: opt.center
270					}
271				});
272		},
273
274		addevents: function(obj,$a){
275			var self = this, speed = this.o.speed;
276			var $container = $('.stream',obj), filters = {}
277			$('.controls',obj).delegate('a','click',function(){
278				var x = $(this).attr('class');
279				switch(x)
280				{
281					case 'prev':
282					self.pauseTimer();
283					ticker($a,'prev',speed);
284					break;
285					case 'next':
286					self.pauseTimer();
287					ticker($a,'next',speed);
288					break;
289					case 'play':
290					self.rotate(obj);
291					$('.controls .play').removeClass('play').addClass('pause');
292					break;
293					case 'pause':
294					self.pauseTimer();
295					break;
296				}
297				return false;
298			});
299			$('.filter',obj).delegate('a','click',function(){
300				if(opt.wall == false){
301					var rel = $(this).attr('rel');
302					if($(this).parent().hasClass('active')){
303						$('.dcsns-'+rel,$a).slideUp().addClass('inactive');
304						$(this).parent().animate({opacity: 0.3},400);
305					} else {
306						$('.dcsns-'+rel,$a).slideDown().removeClass('inactive');
307						$(this).parent().animate({opacity: 1},400);
308					}
309					$(this).parent().toggleClass('active');
310				}
311				return false;
312			});
313			if(this.o.external){
314				$a.delegate('a','click',function(){
315					if(!$(this).parent().hasClass('section-share')){
316						this.target = '_blank';
317					}
318				});
319			}
320		},
321		rotate: function(a){
322			var self = this, stream = $('.'+this.o.cstream,a), speed = this.o.speed, delay = this.o.rotate.delay, r = this.o.rotate.direction == 'up' ? 'prev' : 'next' ;
323			this.timer_on = 1;
324			$('.controls .play').removeClass('play').addClass('pause');
325			this.timerId = setTimeout(function(){
326				ticker(stream,r,speed);
327				self.rotate(a);
328			}, delay);
329		},
330		pauseTimer: function(){
331			clearTimeout(this.timerId);
332			this.timer_on = 0;
333			$('.controls .pause').removeClass('pause').addClass('play');
334		}
335	});
336
337	$.fn.dcSocialStream = function(options, callback){
338		var d = {};
339		this.each(function(){
340			var s = $(this);
341			d = s.data("socialtabs");
342			if (!d){
343				d = new SocialStreamObject(this, options, callback);
344				s.data("socialtabs", d);
345			}
346		});
347		return d;
348	};
349
350	function getFeed(type,id,path,o,obj,opt,f1,f2,intro,feed,fn){
351
352		var stream = $('.stream',obj), list = [],d = '', px = 300, c = [],data, href, url, n = opt.limit, txt = [], src;
353		frl = 'https://ajax.googleapis.com/ajax/services/feed/load?v=1.0&num='+n+'&callback=?&q=';
354
355		switch (type) {
356
357			case 'facebook':
358			var cp = id.split('/');
359			var curl = o.url.replace(/\&#038;/gi, "&");
360			url = url = cp.length > 1 ? curl + '?id='+cp[1]+'&limit='+n+'&feed=photos' : curl + '?id='+id+'&limit='+n+'&feed='+o.feed;
361			break;
362
363			case 'twitter':
364			var curl = o.url.replace(/\&#038;/gi, "&");
365			var cp = id.split('/'), cq = id.split('#'), cu = o.url.split('?'), replies = o.replies == true ? '&exclude_replies=false' : '&exclude_replies=true' ;
366			var param = '&include_entities=true&include_rts='+o.retweets+replies;
367			url1 = cu.length > 1 ? curl + '&' : curl + '?';
368			url = cp.length > 1 ? url1 + 'url=list&list_id='+cp[1]+'&per_page='+n+param : url1 + 'url=timeline&screen_name='+id+'&count='+n+param;
369			if(cq.length > 1){
370				var rts = o.retweets == false ? '+exclude:retweets' : '' ;
371				url = url1 + 'url=search&q='+cq[1]+'&count='+n;
372			}
373			break;
374
375			case 'google':
376			n = n > 100 ? 100 : n ;
377			href = 'https://plus.google.com/'+id;
378			url = 'https://www.googleapis.com/plus/v1/people/'+id+'/activities/public';
379			data = {key: o.api_key, maxResults: n, prettyprint: false, fields: "items(id,kind,object(attachments(displayName,fullImage,id,image,objectType,url),id,objectType,plusoners,replies,resharers,url),published,title,url,verb)"};
380			break;
381
382			case 'youtube':
383			n = n > 50 ? 50 : n ;
384			var cp = id.split('/'), cq = decodeURIComponent(id).split('#'), cc = id.split('!');
385			if(cq.length > 1){
386				url = 'https://www.googleapis.com/youtube/v3/search?part=snippet&key=' + o.api_key + '&pageToken=&order=date&maxResults=' + n + '&q=' + cq[1];
387				href = 'https://www.youtube.com/results?search_query=' + cq[1];
388			} else {
389				if(cc.length > 1){
390					id = cc[1];
391					id = 'UU' + cc[1].substring(2);
392					href = 'https://www.youtube.com/channel/UC' + id.substring(2);
393				} else {
394					id = cp.length > 1 ? cp[1] : id ;
395					if(id.substr(0,2) != 'UU'){
396						if(id.substr(0,2) != 'UC'){
397							// is playlist ID
398							href = 'https://www.youtube.com/playlist?list=' + id;
399						} else {
400							// is channel ID
401							href = 'https://www.youtube.com/channel/' + id;
402							id = 'UU' + id.substring(2);
403						}
404					} else {
405						// is list ID
406						href = 'https://www.youtube.com/channel/UC' + id.substring(2);
407					}
408				}
409				url = 'https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId=' + id + '&key=' + o.api_key + '&pageToken=&maxResults=' + n;
410			}
411			break;
412
413			case 'flickr':
414			var cq = id.split('/'), fd = cq.length > 1 ? 'groups_pool' : 'photos_public' ;
415			id = cq.length > 1 ? cq[1] : id ;
416			href = 'https://www.flickr.com/photos/'+id;
417			url = 'https://api.flickr.com/services/feeds/'+fd+'.gne?id='+id+'&lang='+o.lang+'&format=json&jsoncallback=?';
418			break;
419
420			case 'delicious':
421			href = 'https://www.delicious.com/'+id;
422			url = 'http://feeds.delicious.com/v2/json/'+id;
423			break;
424
425			case 'pinterest':
426			var cp = id.split('/');
427			url = 'https://www.pinterest.com/'+id;
428			var curl = o.url.replace(/\&#038;/gi, "&");
429			href = 'http://www.pinterest.com/'+id;
430			url = cp.length > 1 ? curl + '?id='+id+'&limit='+n+'&feed=board&type='+type : curl + '?id='+id+'&limit='+n+'&feed=user&type='+type;
431			break;
432
433			case 'rss':
434			href = id;
435			var cp = id.split('://');
436			var curl = o.url.replace(/\&#038;/gi, "&");
437			url = curl + '?id='+encodeURIComponent(cp[1])+'&limit='+n+'&type='+type;
438			break;
439
440			case 'lastfm':
441			href = 'https://www.last.fm/user/'+id;
442			var ver = feed == 'lovedtracks' ? '2.0' : '1.0' ;
443			url = frl + encodeURIComponent('https://ws.audioscrobbler.com/'+ver+'/user/'+id+'/'+feed+'.rss');
444			break;
445
446			case 'dribbble':
447			href = 'https://www.dribbble.com/'+id;
448			url = 'https://api.dribbble.com/v1/users/'+id+'/'+feed+'?access_token='+o.accessToken+'&sort=recent&page=';
449			break;
450
451			case 'vimeo':
452			href = 'https://www.vimeo.com/'+id;
453			url = 'https://vimeo.com/api/v2/'+id+'/'+feed+'.json';
454			break;
455
456			case 'stumbleupon':
457			href = 'https://www.stumbleupon.com/stumbler/'+id;
458			url = frl + encodeURIComponent('http://rss.stumbleupon.com/user/'+id+'/'+feed);
459			break;
460
461			case 'deviantart':
462			href = 'https://'+id+'.deviantart.com';
463			url = frl + encodeURIComponent('https://backend.deviantart.com/rss.xml?type=deviation&q=by%3A'+id+'+sort%3Atime+meta%3Aall');
464			break;
465
466			case 'tumblr':
467			href = 'http://'+id+'.tumblr.com';
468			url = 'http://'+id+'.tumblr.com/api/read/json?callback=?&num='+n;
469			break;
470
471			case 'instagram':
472			href = '#';
473			url = 'https://api.instagram.com/v1';
474			var cp = id.substr(0,1), cq = id.split(cp), url1 = cq[1], qs = '', ts = 0;
475			switch(cp)
476			{
477				case '?':
478				var p = cq[1].split('/');
479				qs = '&lat='+p[0]+'&lng='+p[1]+'&distance='+p[2];
480				url += '/media/search';
481				break;
482				case '#':
483				url += '/tags/'+url1+'/media/recent';
484				ts = 1;
485				break;
486				case '!':
487				url += '/users/'+url1+'/media/recent';
488				break;
489				case '@':
490				url += '/locations/'+url1+'/media/recent';
491				break;
492			}
493			if(o.accessToken == '' && ts == 0){
494				if (location.hash) {
495					o.accessToken = location.hash.split('=')[1] ;
496				} else {
497					location.href="https://instagram.com/oauth/authorize/?client_id="+o.clientId+"&redirect_uri="+o.redirectUrl+"&response_type=token";
498				}
499			}
500			url += '?access_token='+o.accessToken+'&client_id='+o.clientId+'&count='+n+qs;
501			break;
502		}
503		var dataType = type == 'twitter' || type == 'facebook' || type == 'rss' || type == 'pinterest' || type == 'dribbble' ? 'json' : 'jsonp';
504		jQuery.ajax({
505			url: url,
506			data: data,
507			cache: opt.cache,
508			dataType: dataType,
509			success: function(a){
510				var error = '';
511				switch(type)
512				{
513					case 'facebook':
514						if(cp.length > 1){
515							a = a.data;
516						} else {
517							a = a.responseData.feed.entries ? a.responseData.feed.entries : '';
518						}
519					break;
520					case 'google':
521						error = a.error ? a.error : '' ;
522						a = a.items;
523					break;
524					case 'flickr':
525						a = a.items;
526					break;
527					case 'instagram':
528						a = a.data;
529					break;
530					case 'pinterest':
531						a = a.item;
532					break;
533					case 'twitter':
534						error = a.errors ? a.errors : '' ;
535						if(cq.length > 1){a = a.statuses} ;
536					break;
537					case 'youtube':
538						a = a.items;
539					break;
540					case 'dribbble':
541					break;
542					case 'tumblr':
543						a = a.posts;
544					break;
545					case 'delicious':
546					break;
547					case 'vimeo':
548					break;
549					case 'rss':
550						a = a.item;
551					break;
552					default:
553						if(a.responseStatus == 200){
554							a = a.responseData.feed.entries;
555						} else {
556							error = a.responseDetails;
557						}
558					break;
559				}
560				if(error == ''){
561					$.each(a, function(i,item){
562						if(i < n){
563							var html = [], q = item.link, u='<a href="'+href+'">'+id+'</a>', w='', x = '<a href="'+q+'">'+item.title+'</a>', y='', z='', zz='', m='', d = item.publishedDate, sq = q, st = item.title, s = '';
564							switch(type)
565							{
566								case 'facebook':
567								if(cp.length > 1){
568									id = item.from.id;
569									var d = new Date();
570									d = d.setFbAlbum(item.created_time);
571									var set = parseQ(item.link);
572									st = cp[0] != '' ? cp[0] : item.from.name ;
573									u = '<a href="'+item.link+'">'+st+'</a>';
574									x = '';
575									if(item.images[o.image_width] == undefined){o.image_width = 0;}
576									z = '<a href="'+item.link+'"><img src="'+item.images[o.image_width].source+'" alt="" /></a>';
577									if(item.name){
578										z +='<p>
578'+item.name+'</p>';
579									}
580									if(o.comments > 0 && item.comments){
581										i = 0;
582										m += '<span class="meta"><span class="comments">comments</span></span>';
583										$.each(item.comments.data, function(i,cmt){
584											if(o.comments > i){
585												m += '<span class="meta item-comments"><a href="http://facebook.com/'+cmt.from.id+'">'+cmt.from.name+'</a>'+cmt.message+'</span>';
586												i++;
587											} else {
588												return false;
589											}
590										});
591									}
592									z += m;
593								} else {
594									x = '';
595									thumb = item.thumb;
596									if(thumb != null)
597									{
598										if(thumb.indexOf('safe_image.php') != -1) {
599											if(thumb.indexOf('fbstaging') != -1) {
600												thumb = 'https://images1-focus-opensocial.googleusercontent.com/gadgets/proxy?container=focus&resize_w=260&refresh=86400&url='+encodeURIComponent(thumb);
601											} else {
602												thumb = unescape(thumb.match(/url=([^&]+)/)[1]);
603											}
604										}
605										y = '<a href="'+q+'"><img src="'+thumb+'" alt="" /></a>';
606									}
607									u = '<a href="'+item.pageLink+'">'+item.pageName+'</a>';
608									href = item.pageLink;
609									z = linkify(item.content,type);
610									st = item.content;
611								}
612								break;
613
614								case 'twitter':
615								d = parseTwitterDate(item.created_at);
616								var un = item.user.screen_name, ua = item.user.profile_image_url_https ;
617								href = 'https://www.twitter.com/'+un;
618								q = href;
619								y = '<a href="'+q+'" class="thumb"><img src="'+ua+'" alt="" /></a>' ;
620								z = '<span class="twitter-user"><a href="https://www.twitter.com/'+un+'"><strong>'+item.user.name+' </strong>@'+un+'</a></span>';
621								z += linkify(item.text,type);
622								if(o.images != '' && item.entities.media){
623									$.each(item.entities.media, function(i,media){
624										z += '<a href="'+media.media_url_https+'"><img src="'+media.media_url_https+':'+o.images+'" alt="" /></a>';
625									});
626								}
627								sq = item.id_str;
628								break;
629
630								case 'delicious':
631								var d = new Date();
632								d = d.setRFC3339(item.dt);
633								x = '<a href="'+item.u+'">'+item.d+'</a>';
634								q = item.u;
635								z = item.n;
636								sq = item.u;
637								st = item.d;
638								break;
639
640								case 'rss':
641								z = item.text;
642								var src = item.image;
643								y = src ? '<a href="'+q+'"><img src="'+src+'" alt="" /></a>' : '' ;
644								break;
645
646								case 'pinterest':
647								var src = $('img',item.description).attr('src');
648								y = src ? '<a href="'+q+'"><img src="'+src+'" alt="" /></a>' : '' ;
649								z = item.text;
650								st = z;
651								break;
652
653								case 'youtube':
654								x =	item.snippet.title;
655								var vidId = cq.length > 1 ? item.id.videoId : item.snippet.resourceId.videoId ;
656								var ytthumb = o.thumb == '0' ? 'medium' : o.thumb ;
657								q = 'https://www.youtube.com/watch?v='+vidId+'&feature=youtube_gdata';
658								sq = q;
659								if(item.snippet.thumbnails){
660									y = '<a href="'+q+'" title="'+item.snippet.title+'"><img src="'+item.snippet.thumbnails[ytthumb].url+'" alt="" /></a>';
661								} else {
662									opt.remove += ','+q;
663								}
664								z = o.text > 0 ? cut(item.snippet.description,o.text) : item.snippet.description ;
665								d = item.snippet.publishedAt;
666								var profile = 'Youtube';
667								if(cq.length > 1){
668									profile = decodeURIComponent(id);
669								} else if(cp.length > 1){
670									profile = cp[0];
671								} else if(cc.length > 1){
672									profile = cc[0];
673								}
674								u='<a href="'+href+'">'+profile+'</a>';
675								st = item.snippet.title;
676								break;
677
678								case 'flickr':
679								d = parseTwitterDate(item.published);
680								x =	item.title;
681								y = '<a href="' + q + '" title="'+ item.title +'"><img src="' + item.media.m + '" alt="" /></a>';
682								break;
683
684								case 'lastfm':
685								q = item.content;
686								break;
687
688								case 'dribbble':
689								q = item.html_url;
690								d = item.created_at;
691								dribbble = feed == 'likes' ? item.shot : item ;
692								st = dribbble.title ;
693								y = '<a href="'+q+'"><img src="' + dribbble.images.normal + '" alt="' + st + '" /></a>';
694								x = '<a href="'+q+'">'+st+'</a>';
695								z = '<span class="meta"><span class="views">'+num(dribbble.views_count)+'</span>
695<span class="likes">'+num(dribbble.likes_count)+'</span><span class="comments">'+num(dribbble.comments_count)+'</span></span>';
696								sq = q;
697								break;
698
699								case 'instagram':
700								d = parseInt(item.created_time * 1000,10);
701								x = '';
702								y = '<a href="'+ q +'"><img src="' + item.images[o.thumb].url + '" alt="" /></a>';
703								z = item.caption !=null ? htmlEncode(item.caption.text) : '' ;
704								u = '<a href="'+q+'">'+item.user.username+'</a>';
705								href = 'https://instagram.com/'+item.user.username;
706								st = item.caption !=null ? item.caption.text : '' ;
707								break;
708
709								case 'vimeo':
710								f = feed, at = item.name, tx = item.description, q = item.url;
711								if(f == 'channels'){
712									y = item.logo != '' ? '<a href="'+q+'" class="logo"><img src="'+item.logo+'" alt="" width="'+px+'" /></a>' : '' ;
713								} else if(f == 'groups'){
714									y = '<a href="'+q+'"><img src="'+item.thumbnail+'" alt="" /></a>';
715								} else {
716									var thumb = 'thumbnail_'+o.thumb, at = item.title, tx = f != 'albums' ? item.duration+' secs' : item.description ;
717									y = '<a href="'+item.url+'" title="'+at+'"><img src="'+item[thumb]+'" alt="" /></a>';
718								}
719								x = '<a href="'+q+'">'+at+'</a>';
720								z = tx;
721								if(o.stats == true){
722									var m = '';
723									m += f == 'albums' || f == 'channels' || f == 'groups' ? '<span class="videos">'+num(item.total_videos)+'</span>' : '' ;
724									if(f == 'channels'){
725										m += '<span class="users">'+num(item.total_subscribers)+'</span>';
726									} else if(f == 'groups'){
727										m += '<span class="users">'+num(item.total_members)+'</span>';
728									} else if(f != 'albums'){
729										m += '<span class="likes">'+num(item.stats_number_of_likes)+'</span><span class="views">'+num(item.stats_number_of_plays)+'</span><span class="comments">'+num(item.stats_number_of_comments)+'</span>';
730									}
731									z += '<span class="meta">'+m+'</span>';
732								}
733								var dt = item.upload_date;
734								if(f == 'likes'){
735									dt = item.liked_on;
736								} else if(f == 'albums' || f == 'channels' || f == 'groups'){
737									dt = item.created_on;
738								}
739								var d = new Date();
740								d = d.setVimeo(dt);
741								sq = q;
742								st = at;
743								break;
744
745								case 'stumbleupon':
746								var src = $('img',item.content).attr('src');
747								y = src != '' && feed == 'favorites' ? '<a href="'+q+'"><img src="'+src+'" alt="" /></a>' : '' ;
748								z = item.contentSnippet;
749								break;
750
751								case 'deviantart':
752								var src = $('img',item.content).attr('src');
753								y = src ? '<a href="'+q+'"><img src="'+src+'" alt="" /></a>' : '' ;
754								z = item.contentSnippet;
755								break;
756
757								case 'tumblr':
758								q = item['url-with-slug'];
759								d = item.date;
760								x = '<a href="'+q+'">';
761								switch(item.type)
762								{
763									case 'photo':
764									x = item['photo-caption'];
765									z = '<a href="'+q+'"><img src="'+item['photo-url-'+o.thumb]+'" alt="" /></a>';
766									st = x;
767									break;
768									case 'video':
769									x += item['video-caption'];
770									z = o.video != '400' ? item['video-player-'+o.video] : item['video-player'] ;
771									st = x;
772									break;
773									case 'regular':
774									x += item['regular-title'];
775									z = item['regular-body'];
776									st = x;
777									break;
778									case 'quote':
779									x += item['quote-source'];
780									z = item['quote-text'];
781									st = x;
782									break;
783									case 'audio':
784									x = item['id3-artist'] ? '<a href="'+q+'">'+item['id3-artist']+' - '+item['id3-album']+'</a>' : '' ;
785									x += item['id3-title'] ? '<a href="'+q+'" class="track">'+item['id3-title']+'</a>' : '' ;
786									z = item['audio-caption'];
787									z += item['audio-player'];
788									st = item['id3-artist']+' - '+item['id3-album']+' - '+item['id3-title'];
789									break;
790									case 'conversation':
791									x += item['conversation-title'];
792									z = item['conversation-text'];
793									st = x;
794									break;
795									case 'link':
796									var ltxt = item['link-text'].replace(/:/g, '').replace(/\?/g, '').replace(/\!/g, '').replace(/\./g, '').replace(/\'/g, '').replace(/\(/g, '').replace(/\)/g, '').replace(/\@/g, '').replace(/\#/g, '').replace(/\|/g, '').replace(/\&/g, '');
797									x = '<a href="'+item['link-url']+'">'+ltxt+'</a>';
798									z = item['link-description'];
799									st = ltxt;
800									break;
801								}
802								x += item.type != 'photo' || item.type != 'audio' ? '</a>' : '' ;
803								st = stripHtml(st);
804								sq = q;
805								break;
806
807								case 'google':
808								var g = item.object.replies ? num(item.object.replies.totalItems) : 0, m = item.object.plusoners ? num(item.object.plusoners.totalItems) : 0, p = item.object.resharers ? num(item.object.resharers.totalItems) : 0, dl;
809								var d = new Date();
810								d = d.setRFC3339(item.published);
811								dl = {src: "",imgLink: "",useLink: "",useTitle: ""};
812								var k = item.object.attachments;
813								if (k) if (k.length){
814									for (var l = 0; l < k.length; l++) {
815										var h = k[l];
816										if (h.image) {
817											dl.src = h.image.url;
818											dl.imgLink = h.url;
819											if (h.fullImage) {
820												dl.w = h.fullImage.width || 0;
821												dl.h = h.fullImage.height || 0
822											}
823										}
824										if (h.objectType == "article") dl.useLink = h.url;
825										if (h.displayName) dl.useTitle = h.displayName
826									}
827									if (!dl.useLink) dl.useLink = dl.imgLink;
828									var img_h = o.image_height ? o.image_height : 75 ;
829									var img_w = o.image_width ? o.image_width : 75 ;
830									if (dl.src.indexOf("resize_h") >= 0) dl.src = dl.w >= dl.h ? dl.src.replace(/resize_h=\d+/i, "resize_h=" + img_h) : dl.src.replace(/resize_h=\d+/i, "resize_w=" + img_w)
831								}
832								dl = dl;
833								q = dl.useLink;
834								y = (dl.src ? (dl.useLink ? '<a href="' + dl.useLink + '">' : '')+'<img src="' + dl.src + '" />'+(dl.useLink ? '</a>' : '') : '');
835								var t1 = px/(dl.w/dl.h) < px/3 ? ' class="clear"' : '' ;
836								x = (dl.useLink ? '<a href="' + dl.useLink + '"'+t1+'>' : '')+(item.title ? item.title : dl.useTitle)+(dl.useLink ? '</a>' : '');
837								if(o.shares){
838									z = '<span class="meta"><span class="plusones">+1s '+m+'</span><span class="shares">'+p+'</span><span class="comments">'+g+'</span></span>';
839								}
840								sq = q;
841								st = dl.useTitle;
842								break;
843							}
844
845						//	icon = '<a class="aaaa" href="'+href+'">'+o.icon+'</a>';
846							icon = '<p class="aaaa">'+o.icon+'</p>';
847
848							if(type == 'twitter'){
849								var intent = 'https://twitter.com/intent/';
850								s = '<a href="'+intent+'tweet?in_reply_to='+sq+'&via='+opt.twitterId+'" class="share-reply"></a>';
851								s += '<a href="'+intent+'retweet?tweet_id='+sq+'&via='+opt.twitterId+'" class="share-retweet"></a>';
852								s += '<a href="'+intent+'favorite?tweet_id='+sq+'" class="share-favorite"></a>';
853								s += share('','https://twitter.com/'+un+'/status/'+sq,opt.twitterId);
854							} else {
855								s = share(st,sq,opt.twitterId);
856							}
857
858							$.each(o.out.split(','), function(i,v){
859
860								zz += v != 'intro' ? '<span class="section-'+v+'">' : '' ;
861								switch(v)
862								{
863									case 'intro':
864									if(type == 'twitter'){
865										zintro = '<span class="section-'+v+'"><a href="'+q+'">'+decodeURIComponent(intro)+'</a> <span><a href="https://twitter.com/'+un+'/status/'+item.id_str+'">'+nicetime(new Date(d).getTime(),0)+'</a></span></span>';
866									} else {
867										zintro = '<span class="section-'+v+'"><a href="'+q+'">'+decodeURIComponent(intro)+'</a> <span>'+nicetime(new Date(d).getTime(),0)+'</span></span>';
868									}
869									break;
870									case 'title':
871									zz += x;
872									break;
873									case 'thumb':
874									zz += y;
875									break;
876									case 'text':
877									zz += z;
878									break;
879									case 'user':
880									zz += u;
881									break;
882									case 'meta':
883									zz += m;
884									break;
885									case 'share':
886									zz += s;
887									break;
888								}
889								zz += v != 'intro' ? '</span>' : '' ;
890							});
891
892							var df = type == 'instagram' ? nicetime(d,1) : nicetime(new Date(d).getTime(),1);
893							var ob = df;
894							switch(opt.order)
895							{
896								case 'random':
897								ob = randomish(6);
898								break;
899								case 'none':
900								ob = 1;
901								break;
902							}
903							var out = '<li rel="'+ob+'" class="aaa dcsns-li dcsns-'+type+' dcsns-feed-'+fn+'">'+w+'<div class="inner">'+zz+'<span class="clear"></span></div>'+zintro+icon+'</li>', str = decodeURIComponent(opt.remove), rem = q;
904							if(type == 'twitter'){
905								rem = 'https://twitter.com/'+un+'/status/'+item.id_str;
906							}
907							if( str.indexOf( rem ) !== -1 && rem != '' ){
908								n = n + 1;
909							} else {
910								if(opt.max == 'days'){
911									if(df <= f2 * 86400 && df >= f1 * 86400){
912										list.push(out);
913									} else if(df > f2 * 86400) {
914										return false;
915									}
916								} else {
917									list.push(out);
918								}
919							}
920						}
921					});
922				} else if(opt.debug == true){
923					list.push('<li class="dcsns-li dcsns-error">Error. '+error+'</li>');
924				}
925			},
926			complete: function(){
927				var $newItems = $(list.join(''));
928				if(opt.wall == true){
929					stream.isotope( 'insert', $newItems );
930					if(type == 'facebook' && cp.length < 2){
931						$('img',stream).on('load', function(){ stream.isotope('layout'); });
932					}
933					if(type == 'pinterest' || type == 'rss' || type == 'dribbble'){
934						$('li.dcsns-'+type+' .section-thumb img',stream).css('opacity',0).show().fadeTo(800,1);
935						$('img',stream).on('load', function(){ stream.isotope('layout'); });
936					}
937					if(type == 'twitter'){
938						setTimeout(function(){
939							stream.isotope('layout');
940						},1000);
941						$('img',stream).on('load', function(){ stream.isotope('layout'); });
942					}
943
944				} else {
945					stream.append($newItems);
946					sortstream(stream,'asc');
947				}
948				if(type == 'flickr' && cq.length > 1){
949					flickrHrefLink(cq[1],$newItems);
950				}
951			}
952		});
953		return;
954	}
955
956	function linkify(text,type){
957		text = text.replace(
958			/((https?\:\/\/)|(www\.))(\S+)(\w{2,4})(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/gi,
959			function(url){
960				var full_url = !url.match('^https?:\/\/') ? 'http://' + url : url ;
961				return '<a href="' + full_url + '">' + url + '</a>';
962			}
963		);
964		if(type == 'twitter'){
965			text = text.replace(/(^|\s)@(\w+)/g, '$1@<a href="http://www.twitter.com/$2">$2</a>');
966			text = text.replace(/(^|\s)#(\w+)/g, '$1#<a href="http://twitter.com/search/%23$2">$2</a>');
967		} else if(type == 'facebook'){
968			text = text.replace(/(^|\s)#(\w+)/g, '$1#<a href="http://facebook.com/hashtag/%23$2">$2</a>');
969		}
970		return text;
971	}
972
973	function cut(text,n){
974		var short = text.substr(0, n);
975		if (/^\S/.test(text.substr(n)))
976		short = short.replace(/\s+\S*$/, "");
977		return short;
978	}
979
980	function htmlEncode(v){
981		return $('<div/>').text(v).html();
982	}
983
984	function stripHtml(v){
985		var $html = $(v);
986		return $html.text();
987	}
988
989	Date.prototype.setRFC3339 = function(dString){
990	   var utcOffset, offsetSplitChar;
991	   var offsetMultiplier = 1;
992	   var dateTime = dString.split('T');
993	   var date = dateTime[0].split('-');
994	   var time = dateTime[1].split(':');
995	   var offsetField = time[time.length - 1];
996	   var offsetString;
997	   offsetFieldIdentifier = offsetField.charAt(offsetField.length - 1);
998	   if (offsetFieldIdentifier == 'Z') {
999		  utcOffset = 0;
1000		  time[time.length - 1] = offsetField.substr(0, offsetField.length - 2);
1001	   } else {
1002		  if (offsetField[offsetField.length - 1].indexOf('+') != -1) {
1003			 offsetSplitChar = '+';
1004			 offsetMultiplier = 1;
1005		  } else {
1006			 offsetSplitChar = '-';
1007			 offsetMultiplier = -1;
1008		  }
1009		  offsetString = offsetField.split(offsetSplitChar);
1010		  time[time.length - 1] == offsetString[0];
1011		  offsetString = offsetString[1].split(':');
1012		  utcOffset = (offsetString[0] * 60) + offsetString[1];
1013		  utcOffset = utcOffset * 60 * 1000;
1014	   }
1015	   this.setTime(Date.UTC(date[0], date[1] - 1, date[2], time[0], time[1], time[2]) + (utcOffset * offsetMultiplier ));
1016	   return this;
1017	};
1018
1019	Date.prototype.setFbAlbum = function(dString){
1020	   var utcOffset, offsetSplitChar = '+', offsetMultiplier = 1, dateTime = dString.split('T'), date = dateTime[0].split('-'), time = dateTime[1].split(':'), offsetField = time[time.length - 1], offsetString;
1021		  if (offsetField[offsetField.length - 1].indexOf('+') != -1) {
1022			 offsetSplitChar = '-';
1023			 offsetMultiplier = -1;
1024		  }
1025		  offsetTime = offsetField.split(offsetSplitChar);
1026		  utcOffset = parseInt((offsetTime[1]/100),10) * 60 * 1000;
1027	   this.setTime(Date.UTC(date[0], date[1] - 1, date[2], time[0], time[1], offsetTime[0]) + (utcOffset * offsetMultiplier ));
1028	   return this;
1029	};
1030
1031	Date.prototype.setVimeo = function(dString){
1032	   var utcOffset = 0, offsetSplitChar, offsetMultiplier = 1;
1033	   var dateTime = dString.split(' ');
1034	   var date = dateTime[0].split('-');
1035	   var time = dateTime[1].split(':');
1036	   this.setTime(Date.UTC(date[0], date[1] - 1, date[2], time[0], time[1], time[2]) + (utcOffset * offsetMultiplier ));
1037	   return this;
1038	};
1039
1040	function parseTwitterDate(a){
1041		var out = !!navigator.userAgent.match(/Trident\/7\./) || navigator.userAgent.indexOf("MSIE")>= 0 || navigator.userAgent.indexOf("Edge")>= 0 ? a.replace(/(\+\S+) (.*)/, '$2 $1') : a ;
1042		return out;
1043	}
1044
1045	function nicetime(a,out){
1046        var d = Math.round((+new Date - a) / 1000), fuzzy = '', n = 'mins', d = d < 0 ? 0 : d ;
1047        // fuzzy += ' il y a ';
1048        if(out == 1) {
1049            return d;
1050        } else if(out == 0) {
1051            var chunks = new Array();
1052                    chunks[0] = [60 * 60 * 24 * 365 , 'an', 'ans'];
1053                    chunks[1] = [60 * 60 * 24 * 30 , 'mois', 'mois'];
1054                    chunks[2] = [60 * 60 * 24 * 7, 'sem', 'sem'];
1055                    chunks[3] = [60 * 60 * 24 , 'j', 'j'];
1056                    chunks[4] = [60 * 60 , 'h', 'h'];
1057                    chunks[5] = [60 , 'min', 'min'];
1058                    var i = 0, j = chunks.length;
1059                    for (i = 0; i < j; i++) {
1060                        s = chunks[i][0];
1061                        if ((xj = Math.floor(d / s)) != 0)
1062                        {
1063                            n = xj == 1 ? chunks[i][1] : chunks[i][2] ;
1064                            break;
1065                        }
1066                    }
1067                    fuzzy += xj == 1 ? '1'+n : xj+''+n ;
1068                    if (i + 1 < j) {
1069                        s2 = chunks[i + 1][0];
1070                        if ( ((xj2 = Math.floor((d - (s * xj)) / s2)) != 0) )
1071                        {
1072                            n2 = (xj2 == 1) ? chunks[i + 1][1] : chunks[i + 1][2] ;
1073                            fuzzy += (xj2 == 1) ? ' 1'+n2 : ' '+xj2+''+n2 ;
1074                        }
1075                    }
1076            return fuzzy;
1077            }
1078        }
1079
1080		function num(a){
1081            var b = a;
1082            if (a > 999999) b = Math.floor(a / 1E6) + "M";
1083            else if (a > 9999) b = Math.floor(a / 1E3) + "K";
1084            else if (a > 999) b = Math.floor(a / 1E3) + "," + a % 1E3;
1085            return b
1086        }
1087
1088		function parseQ(url){
1089			var v = [], hash, q = url.split('?')[1];
1090			if(q != undefined){
1091				q = q.split('&');
1092				for(var i = 0; i < q.length; i++){
1093					hash = q[i].split('=');
1094					v.push(hash[1]);
1095					v[hash[0]] = hash[1];
1096				}
1097			}
1098			return v;
1099		}
1100
1101		function getImg(content){
1102			var imgArr = new Array(), reg = /<img .*?src=["\']([^ ^"^\']*)["\']/gi, check, image;
1103			while (check = reg.exec(content)){
1104				imgArr.push(check[1]);
1105			}
1106			if(imgArr.length > 0 && imgArr[0].indexOf('sndcdn.com') === -1){
1107				var image = imgArr[0];
1108				if(image.indexOf('instagram.com/profiles') !== -1) { image = imgArr[1]; }
1109				image = image.replace("_m.jpg", ".jpg");
1110				if(image.indexOf('fbcdn') == -1) {
1111					image = image.replace("_b.jpg", "_f.jpg");
1112					image = image.replace("_b.png", "_f.png");
1113				} else {
1114					if(image.indexOf('safe_image.php') == -1) {
1115						var id = image.split("_"), object_id = id[1];
1116						image = 'http://graph.facebook.com/'+object_id+'/picture?type=normal';
1117					}
1118				}
1119				image = image.replace("_s.jpg", "_b.jpg");
1120				image = image.replace("_m.png", ".png");
1121				image = image.replace("_s.png", "_b.png");
1122				image = image.replace(/\&amp;/g,'&');
1123				if(image.indexOf('safe_image.php') != -1){
1124					image = unescape(image.match(/url=([^&]+)/)[1]);
1125				}
1126				if(image.indexOf('app_full_proxy.php') != -1){
1127					image = unescape(image.match(/src=([^&]+)/)[1]);
1128				}
1129				if(this.prefix == 'https://'){
1130					var image_tmp = image.replace('http://', 'https://');
1131					image = image_tmp;
1132				}
1133			} else {
1134				return false
1135			}
1136			return image;
1137		}
1138
1139		function sortstream(obj,d){
1140			var $l = $('li',obj);
1141			$l.sort(function(a, b){
1142				var keyA = parseInt($(a).attr('rel'),10), keyB = parseInt($(b).attr('rel'),10);
1143				if(d == 'asc'){
1144					return (keyA > keyB) ? 1 : -1;
1145				} else {
1146					return (keyA < keyB) ? 1 : -1;
1147				}
1148				return 0;
1149			});
1150			$.each($l, function(index, row){
1151				obj.append(row);
1152			});
1153			$('.dcsns-loading').slideUp().remove();
1154			return;
1155		}
1156
1157		function randomish(l){
1158			var i = 0, out = '';
1159			while(i < l){
1160				out += Math.floor((Math.random()*10)+1)+'';
1161				i++;
1162			}
1163			return out;
1164		}
1165
1166		function ticker(s,b,speed){
1167			var $a = $('li:last',s),$b = $('li:first',s),$gx,bh = $b.outerHeight(true);
1168			if($('li',s).not('.inactive').length > 2){
1169				if(b == 'next'){
1170					$gx = $a.clone().hide();
1171					$b.before($gx);
1172					$a.remove();
1173					if($a.hasClass('inactive')){
1174						ticker(s,b,speed);
1175					} else {
1176						$('.inner',$gx).css({opacity: 0});
1177						$gx.slideDown(speed,'linear',function(){
1178							$('.inner',this).animate({opacity: 1},speed);
1179						});
1180						return;
1181					}
1182				} else {
1183					$gx = $b.clone();
1184					if($b.hasClass('inactive')){
1185						$a.after($gx);
1186						$b.remove();
1187						ticker(s,b,speed);
1188					} else {
1189						$b.animate({marginTop: -bh+'px'},speed,'linear',function(){
1190							$a.after($gx);
1191							$b.remove();
1192						});
1193						$('.inner',$b).animate({opacity: 0},speed);
1194					}
1195				}
1196			}
1197		}
1198
1199		function flickrHrefLink(id,obj){
1200			jQuery.ajax({
1201				url: 'http://api.flickr.com/services/feeds/groups_pool.gne?id='+id+'&format=json&jsoncallback=?',
1202				dataType: 'jsonp',
1203				success: function(a){
1204					$('.icon',obj).each(function(){
1205						$(this).parent().attr('href',a.link);
1206					});
1207				}
1208			});
1209		}
1210
1211		function share(st,sq,twitterId){
1212			var s = '', sq = encodeURIComponent(sq), st = encodeURIComponent(st);
1213			s = '<a href="http://www.facebook.com/sharer.php?u='+sq+'&t='+st+'" class="share-facebook" target="_blank"></a>';
1214			s += '<a href="https://twitter.com/share?url='+sq+'&text='+st+'&via='+twitterId+'" class="share-twitter" target="_blank"></a>';
1215			s += '<a href="https://plus.google.com/share?url='+sq+'" class="share-google" target="_blank"></a>';
1216			s += '<a href="http://www.linkedin.com/shareArticle?mini=true&url='+sq+'&title='+st+'" class="share-linkedin" target="_blank"></a>';
1217			return s;
1218        }
1219})(jQuery);
1220
1221jQuery(window).load(function(){
1222	jQuery.getScript("//platform.twitter.com/widgets.js", function(){});
1223	jQuery('.section-share a').click(function(){
1224		var u = jQuery(this).attr('href');
1225		window.open(u,'sharer','toolbar=0,status=0,width=626,height=436');
1226		return false;
1227	});
1228});

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.