{"size": 1106, "ext": "js", "max_stars_repo_path": "themes/lc/static/js/slick-width.js", "max_stars_repo_name": "gulrenor/pllc", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "themes/lc/static/js/slick-width.js", "max_issues_repo_name": "gulrenor/pllc", "max_issues_repo_issues_event_min_datetime": "2016-11-28T17:12:48.000Z", "max_issues_repo_issues_event_max_datetime": "2017-02-03T15:07:32.000Z", "max_forks_repo_path": "themes/lc/static/js/slick-width.js", "max_forks_repo_name": "gulrenor/pllc", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 15, "max_forks_count": null, "avg_line_length": 23.5319148936, "max_line_length": 117, "alphanum_fraction": 0.6157323689}
// slick-width.js
// Handles the width of the slick slider's 'title bar'

$(document).ready(function() {
  
  var mobileNavBreakpoint = 'mobile';
  
  function isMobileNav() {
    // Check the html body::before which contains
    // the current breakpoint
    var breakpoint = window.getComputedStyle($('body')[0], ':before').getPropertyValue('content').replace(/\"/g, '');
    if (breakpoint === mobileNavBreakpoint) {
      return true;
    } else {
      return false;
    }
  }

  // Check the current width of the element
  function findWidth(el) {
    return Math.round($(el).width()) + 'px';
  }
  
  // Set width on appropriate elements
  function setLimit(child, container) {
    $(child).css('width', findWidth(container));
  }
  
  // Check if mobile size and apply css
  function checkBreakpoint() {
    if (isMobileNav()) {
      setLimit('.slider-title', '.slider');
    } else {
      $('.slider-title').removeAttr('style');
    }
  }
  
  // Recheck/reset on window resize
  $(window).on('resize', function() {
    checkBreakpoint();
  });
  
  // Check on load
  checkBreakpoint();
  
});
