PageSourceSearch

https://wls-group.co.uk/wp-content/themes/wls/js/scripts.js?ver=2021.05.16

js wls-group.co.uk collected 2026-10-09 23:34:58 UTC 24,284 bytes, 651 lines download raw bytes

1(function ($, root, undefined) {
2
3	$(function () {
4
5        $(document).ready(function() {
6
7// DO ALL JQUERY BELOW THIS LINE
8
9            function msieversion() {
10              var ua = window.navigator.userAgent;
11              var msie = ua.indexOf("MSIE ");
12              if (msie > 0 || !!navigator.userAgent.match(/Trident.*rv\:11\./)){
13                $('body').addClass('intex');
14              }
15              else{
16                $('body').addClass('modern-browser');
17              }
18            return false;
19            }
20
21            msieversion();
22
23            objectFitImages();
24
25            $('.textillate').textillate();
26
27            $('.stops-trigger-view a').on('click touchstart', function(e) {
28              e.preventDefault();
29              $(this).closest('.bus-timetable').removeClass('hide-stops');
30              $(this).closest('.bus-timetable').addClass('view-stops');
31            });
32
33            $('.stops-trigger-hide a').on('click touchstart', function(e) {
34              e.preventDefault();
35              $(this).closest('.bus-timetable').removeClass('view-stops');
36              $(this).closest('.bus-timetable').addClass('hide-stops');
37            });
38
39            $('form.timetable-selector select').on('change', function() {
40               $('form.timetable-selector').submit();
41            });
42
43            $('form.timetable-selector input').on('input', function() {
44               $('form.timetable-selector').submit();
45            });
46
47            $.fn.isVisible = function() {
48              var windowScrollTopView = $(window).scrollTop();
49              var windowBottomView = windowScrollTopView + $(window).height();
50              var elemTop = $(this).offset().top;
51              var elemBottom = elemTop + $(this).height();
52              return ((elemBottom <= windowBottomView) && (elemTop >= windowScrollTopView));
53            };
54
55            $('.main-navigation nav > ul').superfish({
56              cssArrows: false,
57            });
58
59            $('.top-navigation nav > ul').superfish({
60              cssArrows: false,
61            });
62
63
64            var sidrSource = '';
65
66            if($('.header-normal').length)
67              {
68              sidrSource = sidrSource+'.main-navigation > nav';
69              }
70            if($('.header-centered').length)
71              {
72              sidrSource = sidrSource+'.main-navigation > .left > nav, .main-navigation > .right > nav';
73              }
74            if($('.top-navigation .left nav').length)
75              {
76//              sidrSource = sidrSource+', .top-navigation .left nav';
77              }
78            if($('.top-navigation .right nav').length)
79              {
80//              sidrSource = sidrSource+', .top-navigation .right nav';
81              }
82
83            $('.hamburger').sidr({
84                name: 'sidrnav',
85                side: 'right',
86                renaming: false,
87                source: sidrSource
88              });
89
90						if($('section.header').length < 1){
91								$('.wrapper').addClass('no-hero');
92						}
93
94            new WOW().init();
95
96						$(document.body).on('click touchstart', '.hamburger', function() {
97
98				        if($(this).hasClass('is-active') == false){
99
100				            $(this).addClass('is-active');
101
102				            $( ".sidr .horizontal").children(".menu-item-has-children").each(function() {
103				              $( this ).append( '<div class="button sidr-parent"><i class="fas fa-plus"></i></div>' );
104				            });
105
106				        }else{
107				            $(this).removeClass('is-active');
108                    $('.sidr .button.sidr-parent').remove();
109				        }
110
111				    });
112
113				    $(document.body).delegate('.sidr-parent', 'click', function() {
114
115				        var sidrChild = $(this).siblings('.sub-menu');
116
117				        if (sidrChild.is(":hidden")) {
118				            sidrChild.slideDown();
119				            $(this).html('<i class="fas fa-minus"></i>');
120				        } else {
121				            sidrChild.slideUp();
122				            $(this).html('<i class="fas fa-plus"></i>');
123				        }
124				    });
125
126            $("select:not(#cat)").wrap("<span class='select'></span>");
127            $("select#cat").parent().wrap("<span class='select'></span>");
128
129            function counterStart(){
130
131              $(".number-roll").each(function(){
132                if(!$(this).hasClass('rolled')){
133                  var endNumber = $(this).attr('data-number');
134                  $(this).rollNumber({
135                    number: endNumber,
136                    interval: 200,
137                    speed: 1500,
138                    space: 0,
139                    fontStyle: {
140                      'color': 'inherit',
141                      'font-size': 'inherit',
142                      },
143                    symbol:','
144                    });
145                  $(this).addClass('rolled');
146                }
147              });
148
149            };
150
151            if($(".start-number-roll").length){
152
153                $(window).scroll(function() {
154
155                    if($(".start-number-roll").isVisible()) {
156                        counterStart();
157                    }
158                });
159
160                if($(".start-number-roll").isVisible()) {
161                   counterStart();
162                }
163
164            }
165
166            if ($(".countdown-go").length){
167
168              $(".countdown-go").each(function(a) {
169                var $countdownDate = $(this).data('date');
170                $(this).countdown($countdownDate)
171                .on('update.countdown', function(b){
172                  var $countdownFormat = $(this).data('format');
173                  $(this).html(b.strftime($countdownFormat));
174                })
175                .on('finish.countdown', function(c) {
176                  var $countdownEnd = $(this).data('end');
177                  $(this).html($countdownEnd);
178                });
179              });
180            }
181
182            $('.trigger, .sidr-class-trigger').on('click touchstart', function(e) {
183
184                e.preventDefault();
185                var triggerType = $(this).attr('data-trigger');
186                var triggerContent = $(this).attr('data-content');
187
188                if(triggerType == "search"){
189                  $('body').addClass('search-modal');
190									$.sidr('close', 'sidrnav');
191                }
192
193                if(triggerType == "search-close"){
194                  $('body').removeClass('search-modal');
195                }
196
197                if(triggerType == 'image'){
198
199                  var imageUrl = $(this).attr("data-image");
200                  var imageLink = $(this).attr("data-link");
201                  var imageTitle = $(this).attr("data-title");
202                  var popContent = '<div class="align-center"><img src="'+ imageUrl +'" /><hr class="clear" /><h3>'+ imageTitle +'</h3><div class="button"><a target="_blank" href="'+imageLink+'">Learn More</a></div></div>';
203
204                  $('.modal-content').html(popContent);
205                  $('#modalframe').show();
206
207                  var wW = document.body.clientWidth;
208                  var wH = $(window).height();
209                  var modalSize = $('.modal-content').height() + 100;
210                  $('.modal-inner').addClass('image-modal');
211
212                  if(wH < modalSize){
213
214                      $('.modal-content').css('height', wH - 100 + 'px');
215
216                      $('.modal-content').css('overflow-y','scroll');
217                      $('.modal-content').css('overflow-x','hidden');
218
219                  }
220
221                }
222
223                if(triggerType == 'accordion'){
224
225                    if ($(this).siblings('.accordion-answer').is(":hidden")) {
226                        $(this).siblings('.accordion-answer').slideDown();
227                        $(this).addClass('opened ');
228                    } else {
229                        $(this).siblings('.accordion-answer').slideUp();
230                        $(this).removeClass('opened ');
231                    }
232                }
233
234                if(triggerType == 'lightbox'){
235
236                  e.preventDefault();
237                  var lightboxtarget = $(this).attr("href");
238                  $('.lightbox').removeClass('revealed');
239                  $(lightboxtarget).addClass('revealed');
240                  $('body').addClass('noscroll');
241
242                }
243
244                if(triggerType == 'lightbox-close'){
245                  e.preventDefault();
246                  $('.lightbox').removeClass('revealed');
247                  $('body').removeClass('noscroll');
248                }
249
250            });
251
252            $('.modal-overlay, .modal-close').on('click', function() {
253
254                $('#modalframe').addClass('fadeOut');
255                $('.trigger').removeClass('focus');
256                $('body').removeClass('noScroll');
257                setTimeout(function(){
258                    $('.modal-content').html('');
259                    $('#modalframe').removeClass('fadeOut');
260                    $('#modalframe').hide();
261                }, 700);
262
263            });
264
265            $('a.anchor[href^="#"]').on('click',function (e) {
266              e.preventDefault();
267
268              var height = $(window).scrollTop();
269              var headerheight = $('header').height();
270              var target = $(this).attr('href');
271              $('html, body').animate({
272                scrollTop: $(target).offset().top - headerheight
273                }, 1000);
274              });
275
276            $('.testimonials').slick({
277                infinite: true,
278                adaptiveHeight: false,
279								autoplaySpeed: 5000,
280                autoplay: true,
281                arrows: true,
282                dots: true,
283                draggable: true,
284                swipe: true,
285                slidesToShow: 1,
286                slidesToScroll: 1
287            });
288
289            $('.slick-slideshow').slick({
290                infinite: true,
291                adaptiveHeight: false,
292                autoplay: false,
293                draggable: true,
294                swipe: true,
295                slidesToShow: 1,
296                slidesToScroll: 1
297            });
298
299            $('.scrolling-logos').slick({
300                infinite: true,
301                variableWidth: true,
302                autoplay: true,
303                arrows: true,
304                dots: false,
305                draggable: true,
306                centerMode: true,
307                focusOnSelect: true,
308                pauseOnFocus: false,
309                pauseOnHover: false,
310                swipe: true,
311                swipeToSlide: true,
312                slidesToShow: 1,
313                slidesToScroll: 1
314            });
315
316            if ($('section.header').length) {
317              $("body").addClass("has-header");
318            }
319
320            var isMobile = false;
321
322            if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.
322substr(0,4))){
323              isMobile = true;
324            }
325
326            if(isMobile == true){
327              $('body').addClass('mobile-device');
328            }
329
330            function fsBanner(){
331
332                if($('.slideshow-header').length){
333                    var slideshowH = $('.slideshow-header').height();
334                    $('.slideshow-header .slick-slide').css('min-height', slideshowH);
335                    $('.slideshow-header .slick-slide .overlay').css('min-height', slideshowH);
336                  }
337
338//              var hdr = $('.header');
339//              var hdrExists = hdr.length;
340//              if(hdrExists){
341//                  if(!hdr.hasClass('fullscreen')){
342//                      var hdrHeight = hdr.height();
343//                      hdr.css('height', hdrHeight + 'px');
344//                  }
345//              }
346
347                if($('.fullscreen .middle-wrapper').length){
348                    var contentH = $('.fullscreen .middle-wrapper').height() + 40;
349                    console.log(contentH);
350                    var wH = $(window).height();
351                    var ww = document.body.clientWidth;
352                    var hH = 140;
353                    var wHnoHdr = wH - hH;
354                    if(contentH > wHnoHdr){
355//                        var diffH = contentH - wHnoHdr;
356//                        var contentNH = wH + (diffH + 50);
357                        $('.fullscreen').css('min-height', contentH);
358                        $('.fullscreen > .overlay').css('min-height', contentH);
359
360                    }else{
361
362                        if(ww < 741 || wHnoHdr < 740){
363                            $('.fullscreen').css('min-height', wHnoHdr);
364                            $('.fullscreen > .overlay').css('min-height', wHnoHdr);
365                        }else{
366                            $('.fullscreen').css('height', wHnoHdr);
367                            $('.fullscreen > .overlay').css('height', wHnoHdr);
368                        }
369
370                    }
371                }else{
372                    $('.fullscreen').css('height', wHnoHdr);
373                    $('.fullscreen > .overlay').css('height', wHnoHdr);
374                }
375
376
377            }
378
379            fsBanner();
380
381            function pageisLoaded(){
382              $("body").addClass("page-loaded");
383            }
384
385            setTimeout(function () {
386                pageisLoaded();
387            }, 3000);
388
389            $('.map').each(function(){
390                map = new_map( $(this) );
391            });
392
393            var resizeActions;
394
395            $(window).resize(function() {
396
397              clearTimeout(resizeActions);
398
399              resizeActions = setTimeout(function () {
400
401                fsBanner();
402                $.sidr('close', 'sidrnav');
403
404              }, 250);
405
406            });
407
408						function scrolled(){
409							var height = $(window).scrollTop();
410
411							if(height > 0) {
412									$("body").addClass("scrolled");
413							}
414							else{
415									$("body").removeClass("scrolled");
416							}
417						}
418
419            $(window).scroll(function(){
420
421							scrolled()
422
423            });
424
425            $(window).load(function(){
426              pageisLoaded();
427							scrolled()
428            });
429
430
431
432          var $grid = $('.masonrygrid').packery({
433//            columnWidth: '.width-single',
434            itemSelector: '.gridbox',
435            gutter: 0,
436            percentPosition: true
437          });
438
439          var resizeActionsMasonry;
440
441          $(window).resize(function() {
442
443            clearTimeout(resizeActionsMasonry);
444            resizeActionsMasonry = setTimeout(function() {
445
446//              convertGridItems();
447              refreshGrid();
448
449            },250);
450
451          });
452
453          $(window).load(function(){
454
455//            convertGridItems();
456
457            $grid.one('layoutComplete', function(){
458//              convertGridItems();
459              $grid.packery('layout');
460            });
461
462          });
463
464          $(window).scroll(function(){
465
466          });
467
468    function refreshGrid(){
469
470      setTimeout(function() {
471        $grid.packery('layout');
472      }, 450);
473
474    }
475
476    function squareGrid(){
477
478      $(".masonrygrid .gridbox").each(function(){
479
480        var fullheight = $(this).css('width');
481        var halfheight = parseFloat(fullheight)/2;
482        var doubleheight = parseFloat(fullheight)*2;
483
484        if ($(this).is('.width-single.height-single')){
485          $(this).css('height', fullheight);
486        }
487        else if ($(this).is('.width-single.height-double')){
488          $(this).css('height', doubleheight);
489        }
490        else if ($(this).is('.width-double.height-single')){
491          $(this).css('height', halfheight);
492        }
493        else if ($(this).is('.width-double.height-double')){
494          $(this).css('height', fullheight);
495        }
496        else{
497          $(this).css('height', 'auto');
498        }
499
500    refreshGrid();
501
502      });
503
504    }
505
506    function convertGridItems(){
507
508      $(".grid .gridbox").each(function(){
509
510        if ($("body").prop("clientWidth") < 640) {
511
512          if ($(this).is('.width-double.height-single')){
513            $(this).removeClass('width-double height-single').addClass('width-single height-double converted1');
514          }
515          if ($(this).is('.width-double.height-double')){
516            $(this).removeClass('width-double').addClass('width-single converted2');
517          }
518
519
520        }
521        else {
522
523          if ($(this).is('.width-single.height-double.converted1')){
524            $(this).removeClass('width-single height-double converted1').addClass('width-double height-single');
525          }
526          if ($(this).is('.width-single.height-double.converted2')){
527            $(this).removeClass('width-single converted2').addClass('width-double');
528          }
529
530        }
531
532//        squareGrid();
533        refreshGrid();
534
535      });
536
537    }
538
539
540// WOOCOMMERCE STUFF...
541
542            if ($('.woocommerce.single-product section.header').length)
543                {
544                $("h1.entry-title").remove();
545                }
546
547            $(".woocommerce-product-details__short-description").wrapInner("<div class='paragraph'></div>");
548            $(".wc-tab").wrapInner("<div class='paragraph'></div>");
549            $("section.related.products").insertAfter("#related-goes-here");
550            $("#related-goes-here").remove();
551            $("section.related.products").addClass('section relatedproducts-section');
552            $("section.relatedproducts-section").removeClass('related products');
553            $("section.relatedproducts-section").wrapInner('<div class="overlay bg-feature"><div class="content-container align-center"></div></div>');
554
555            $("section.relatedproducts-section > .overlay > div > h2").wrap('<div class="heading heading-h2"></div>');
556
557            $(".woocommerce-pagination").addClass('pagination');
558
559
560
561// DO ALL JQUERY ABOVE THIS LINE
562
563        });
564
565    function new_map( $el ) {
566      var $markers = $el.find('.marker');
567      var args = {
568        zoom    : 16,
569        styles: [{"featureType":"all","elementType":"labels.text.fill","stylers":[{"color":"#7c93a3"},{"lightness":"-10"}]},{"featureType":"administrative.country","elementType":"geometry","stylers":[{"visibility":"on"}]},{"featureType":"administrative.country","elementType":"geometry.stroke","stylers":[{"color":"#a0a4a5"}]},{"featureType":"administrative.province","elementType":"geometry.stroke","stylers":[{"color":"#62838e"}]},{"featureType":"landscape","elementType":"geometry.fill","stylers":[{"color":"#dde3e3"}]},{"featureType":"landscape.man_made","elementType":"geometry.stroke","stylers":[{"color":"#3f4a51"},{"weight":"0.30"}]},{"featureType":"poi","elementType":"all","stylers":[{"visibility":"simplified"}]},{"featureType":"poi.attraction","elementType":"all","stylers":[{"visibility":"on"}]},{"featureType":"poi.business","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"poi.government","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"poi.park","elementType":"all","stylers":[{"visibility":"on"}]},{"featureType":"poi.place_of_worship","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"poi.school","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"poi.sports_complex","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"road","elementType":"all","stylers":[{"saturation":"-100"},{"visibility":"on"}]},{"featureType":"road","elementType":"geometry.stroke","stylers":[{"visibility":"on"}]},{"featureType":"road.highway","elementType":"geometry.fill","stylers":[{"color":"#bbcacf"}]},{"featureType":"road.highway","elementType":"geometry.stroke","stylers":[{"lightness":"0"},{"color":"#bbcacf"},{"weight":"0.50"}]},{"featureType":"road.highway","elementType":"labels","stylers":[{"visibility":"on"}]},{"featureType":"road.highway","elementType":"labels.text","stylers":[{"visibility":"on"}]},{"featureType":"road.highway.controlled_access","elementType":"geometry.fill","stylers":[{"color":"#ffffff"}]},{"featureType":"road.highway.controlled_access","elementType":"geometry.stroke","stylers":[{"color":"#a9b4b8"}]},{"featureType":"road.arterial","elementType":"labels.icon","stylers":[{"invert_lightness":true},{"saturation":"-7"},{"lightness":"3"},{"gamma":"1.80"},{"weight":"0.01"}]},{"featureType":"transit","elementType":"all","stylers":[{"visibility":"off"}]},{"featureType":"water","elementType":"geometry.fill","stylers":[{"color":"#a3c7df"}]}],
570        center    : new google.maps.LatLng(0, 0),
571        disableDefaultUI: false,
572        scrollwheel: false,
573        navigationControl: false,
574        mapTypeControl: false,
575        scaleControl: false,
576        draggable: true,
577        mapTypeId : google.maps.MapTypeId.ROADMAP
578      };
579      var map = new google.maps.Map( $el[0], args);
580      map.markers = [];
581      $markers.each(function(){
582        add_marker( $(this), map );
583      });
584      center_map( map );
585      return map;
586    }
587
588    function add_marker( $marker, map ) {
589
590
591      if ($marker.attr('data-type')=='dot')
592        {
593        var map_marker = {
594            url: $marker.attr('data-style'),
595            scaledSize: new google.maps.Size(6, 6),
596            origin: new google.maps.Point(0, 0),
597            anchor: new google.maps.Point(3, 3)
598          }
599        }
600      else
601        {
602        var map_marker = {
603            url: $marker.attr('data-style'),
604            scaledSize: new google.maps.Size(50, 70),
605            origin: new google.maps.Point(0, 0),
606            anchor: new google.maps.Point(25, 70)
607          }
608        }
609
610
611
612
613      var latlng = new google.maps.LatLng( $marker.attr('data-lat'), $marker.attr('data-lng') );
614
615      var marker = new google.maps.Marker({
616        position  : latlng,
617        map : map,
618        icon : map_marker
619      });
620      map.markers.push( marker );
621      if( $marker.html() ){
622        var infowindow = new google.maps.InfoWindow({
623          content   : $marker.html()
624          });
625        google.maps.event.addListener(marker, 'click', function() {
626          infowindow.open( map, marker );
627        });
628      }
629    }
630
631    function center_map( map ) {
632      var bounds = new google.maps.LatLngBounds();
633      $.each( map.markers, function( i, marker ){
634        var latlng = new google.maps.LatLng( marker.position.lat(), marker.position.lng() );
635        bounds.extend( latlng );
636      });
637      if( map.markers.length == 1 ){
638        map.setCenter( bounds.getCenter() );
639        map.setZoom( 16 );
640      }
641      else{
642        map.fitBounds( bounds );
643      }
644    }
645
646    var map = null;
647
648
649	});
650
651})(jQuery, this);

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.