<commit_before>Ornament = window.Ornament = {

  // SubObject for Ornament Components
  Components: {},

  // Default arrays for external links script
  externalLinkExtensions: [],
  internalLinkSelectors: [],
  jQueryUISupport: false,

  // Header Breakpoint
  // Should match $breakpoint-header in settings.css
  headerBreakpoint: 990,

  lightboxDefaults: {
    type: "inline",
    mainClass: "lightbox--main",
    removalDelay: 300,
    fixedBgPos: true,
    callbacks: {
      open: function(){
        // callback on open to trigger a refresh for google maps
        $(document).trigger("ornament:map_refresh");
        $("body").addClass("lightbox-open");
      },
      close: function(){
        $("body").removeClass("lightbox-open");
      }
    }
  },

  bodyScroll: function(offset, timing){
    $("html,body").animate({
      scrollTop: offset
    }, timing);
  },

  // See if anything is sticky and calc their heights
  getStickyHeights: function(comparison){
    var comparison = comparison || 0;
    var heightOfStickies = 0;
    var $stickies = $("[data-sticky]");

    $stickies.each(function(){

      var $sticky = $(this);
      var thisStickyOffset = $sticky.attr("data-sticky-offset");
      if(comparison > thisStickyOffset) {
        heightOfStickies = $sticky.outerHeight();
      }

    });

    return heightOfStickies;
  },

  geolocationAvailable: function(){
    if (navigator.geolocation) {
      return true;
    } else {
      return false;
    }
  },

  // Map colours
  mapColours: [
    {
      "featureType": "water",
      "elementType": "geometry",
      "stylers": [
        {
          "color": "#0182c6"
        }
      ]
    },
    {
      "featureType": "landscape",
      "elementType": "geometry",
      "stylers": [
      {
        "color": "#7ac043"
      }
      ]
    },
    {
      "featureType": "poi",
      "elementType": "geometry",
      "stylers": [
      {
        "color": "#7ac043"
      }
      ]
    },
    {
      "featureType": "road.highway",
      "elementType": "geometry",
      "stylers": [
        {
          "color": "#7ac043"
        },
        {
          "lightness": -40
        }
      ]
    },
    {
      "featureType": "road.arterial",
      "elementType": "geometry",
      "stylers": [
        {
          "color": "#7ac043"
        },
        {
          "lightness": -20
        }
      ]
    },
    {
      "featureType": "road.local",
      "elementType": "geometry",
      "stylers": [
        {
          "color": "#7ac043"
        },
        {
          "lightness": -17
        }
      ]
    },
    {
      "elementType": "labels.text.stroke",
      "stylers": [
        {
          "color": "#ffffff"
        },
        {
          "visibility": "on"
        },
        {
          "weight": 0.9
        }
      ]
    },
    {
      "elementType": "labels.text.fill",
      "stylers": [
        {
          "visibility": "on"
        },
        {
          "color": "#ffffff"
        }
      ]
    },
    {
      "featureType": "poi",
      "elementType": "labels",
      "stylers": [
        {
          "visibility": "simplified"
        }
      ]
    },
    {
      "elementType": "labels.icon",
      "stylers": [
        {
          "visibility": "off"
        }
      ]
    },
    {
      "featureType": "transit",
      "elementType": "geometry",
      "stylers": [
        {
          "color": "#7ac043"
        },
        {
          "lightness": -10
        }
      ]
    },
    {},
    {
      "featureType": "administrative",
      "elementType": "geometry",
      "stylers": [
        {
          "color": "#7ac043"
        },
        {
          "weight": 0.7
        }
      ]
    }
  ]

};

// Short namespace for Components
// eg. Ornament.C.Toggles
Ornament.C = Ornament.Components;<commit_msg>Simplified geolocation check and added service worker check<commit_after>Ornament = window.Ornament = {

  // SubObject for Ornament Components
  Components: {},

  // Default arrays for external links script
  externalLinkExtensions: [],
  internalLinkSelectors: [],

  // Technology support
  jQueryUISupport: false,
  serviceWorkerSupport: "serviceWorker" in navigator,
  geolocationAvailable: "geolocation" in navigator,

  // Header Breakpoint
  // Should match $breakpoint-header in settings.css
  headerBreakpoint: 990,

  lightboxDefaults: {
    type: "inline",
    mainClass: "lightbox--main",
    removalDelay: 300,
    fixedBgPos: true,
    callbacks: {
      open: function(){
        // callback on open to trigger a refresh for google maps
        $(document).trigger("ornament:map_refresh");
        $("body").addClass("lightbox-open");
      },
      close: function(){
        $("body").removeClass("lightbox-open");
      }
    }
  },

  // Animated scroll 
  bodyScroll: function(offset, timing){
    $("html,body").animate({
      scrollTop: offset
    }, timing);
  },

  // See if anything is sticky and calc their heights
  getStickyHeights: function(comparison){
    var comparison = comparison || 0;
    var heightOfStickies = 0;
    var $stickies = $("[data-sticky]");

    $stickies.each(function(){

      var $sticky = $(this);
      var thisStickyOffset = $sticky.attr("data-sticky-offset");
      if(comparison > thisStickyOffset) {
        heightOfStickies = $sticky.outerHeight();
      }

    });

    return heightOfStickies;
  },

  // Map colours
  mapColours: [{"featureType":"water","elementType":"geometry","stylers":[{"color":"#0182c6"}]},{"featureType":"landscape","elementType":"geometry","stylers":[{"color":"#7ac043"}]},{"featureType":"poi","elementType":"geometry","stylers":[{"color":"#7ac043"}]},{"featureType":"road.highway","elementType":"geometry","stylers":[{"color":"#7ac043"},{"lightness":-40}]},{"featureType":"road.arterial","elementType":"geometry","stylers":[{"color":"#7ac043"},{"lightness":-20}]},{"featureType":"road.local","elementType":"geometry","stylers":[{"color":"#7ac043"},{"lightness":-17}]},{"elementType":"labels.text.stroke","stylers":[{"color":"#ffffff"},{"visibility":"on"},{"weight":0.9}]},{"elementType":"labels.text.fill","stylers":[{"visibility":"on"},{"color":"#ffffff"}]},{"featureType":"poi","elementType":"labels","stylers":[{"visibility":"simplified"}]},{"elementType":"labels.icon","stylers":[{"visibility":"off"}]},{"featureType":"transit","elementType":"geometry","stylers":[{"color":"#7ac043"},{"lightness":-10}]},{},{"featureType":"administrative","elementType":"geometry","stylers":[{"color":"#7ac043"},{"weight":0.7}]}]

};

// Short namespace for Components
// eg. Ornament.C.Toggles
Ornament.C = Ornament.Components;
{'fraction_non_alphanumeric': 0.181584517689749, 'fraction_numerical': 0.016026610220743878, 'mean_word_length': 2.420372285418821, 'pattern_counts': {'":': 106, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7323675', 'n_tokens_mistral': 2172, 'n_tokens_neox': 2054, 'n_words': 332}