<commit_before>/* ========================================================================
 * [githublink here] [docs are here too!]
 * ========================================================================
 * Copyright 2014 <NAME>.
 * Requires jQuery.
 * ======================================================================== */

/* Usage

Required:
data-biginjapan=true : inits biginjapan.

Optional:
data-biginjapan-isincontainer : use true if respect container - default uses browser viewport
data-biginjapan-percentheight : (0-1) % of height of biginjapan - default is 1 (100%)
data-biginjapan-excludeitemfromheight : false / jquery selector

*/

+function ($) { "use strict";


  // Utility
  if ( typeof Object.create !== 'function' ) {
    Object.create = function( obj ) {
      function F() {}
      F.prototype = obj;
      return new F();
    };
  }

  // init GLOBAL nailPluginCollection, used across all .nail plugins.
  if (typeof window.nailPluginCollection !== 'object'){
  window.nailPluginCollection = Object.create({
    'update' : function(){},
    'resize' : function(){}
  });
  window.nailPluginCollectionResize = function(){
    window.nailPluginCollection.resize();
  }
  $(window).on('resize', window.nailPluginCollectionResize);
  }

  // BIGINJAPAN PLUGIN
  // =====================

  $.fn.biginjapan = function () {
    $.fn.biginjapan.wrappers = []; // reset
    var i = 0;
    $('[data-biginjapan]').each(function(){
      var $this = $(this),
      isincontainer = $this.data('biginjapan-isincontainer');
      $.fn.biginjapan.wrappers[i] = {
       el : $this,
       isincontainer : isincontainer,
       excludeitemsfromheight : $this.data('biginjapan-excludeitemsfromheight'),
       percentheight : $this.data('biginjapan-percentheight') === undefined ? 1 : Number($this.data('biginjapan-percentheight'))
      }
      if(isincontainer==true){
        $.fn.biginjapan.wrappers[i].myparent = $this.parent();
      }
      i++;
    });

  }

  $.fn.biginjapan.excludeitemfromheight = function(excludeitemfromheight){
    var _excludeheight = 0;
    $(excludeitemfromheight).each(function(){
     _excludeheight += $(this).outerHeight();
    });
    return _excludeheight;

  }

  $.fn.biginjapan.wrappers = [];

  $.fn.biginjapan.resize = function(){

    if (typeof window.innerWidth != 'undefined') {
      var _w = window.innerWidth,
      _h = window.innerHeight;
    } else {
      var _w = document.documentElement.clientWidth,
      _h = document.documentElement.clientHeight;
    }

    for(var i=0;i<$.fn.biginjapan.wrappers.length;i++){
      var e = $.fn.biginjapan.wrappers[i];
      var c = $.fn.biginjapan.excludeitemfromheight(e.excludeitemsfromheight);
      if(e.isincontainer==true){
        e.el.css({ 'width':e.myparent.width(), 'height':(e.myparent.height()-c)*e.percentheight });
      } else {<commit_msg>Use Jquery's .width() / height() to messure window size.<commit_after>/* ========================================================================
 * [githublink here] [docs are here too!]
 * ========================================================================
 * Copyright 2014 <NAME>.
 * Requires jQuery.
 * ======================================================================== */

/* Usage

Required:
data-biginjapan=true : inits biginjapan.

Optional:
data-biginjapan-isincontainer : use true if respect container - default uses browser viewport
data-biginjapan-percentheight : (0-1) % of height of biginjapan - default is 1 (100%)
data-biginjapan-excludeitemfromheight : false / jquery selector

*/

+function ($) { "use strict";


  // Utility
  if ( typeof Object.create !== 'function' ) {
    Object.create = function( obj ) {
      function F() {}
      F.prototype = obj;
      return new F();
    };
  }

  // init GLOBAL nailPluginCollection, used across all .nail plugins.
  if (typeof window.nailPluginCollection !== 'object'){
  window.nailPluginCollection = Object.create({
    'update' : function(){},
    'resize' : function(){}
  });
  window.nailPluginCollectionResize = function(){
    window.nailPluginCollection.resize();
  }
  $(window).on('resize', window.nailPluginCollectionResize);
  }

  // BIGINJAPAN PLUGIN
  // =====================

  $.fn.biginjapan = function () {
    $.fn.biginjapan.wrappers = []; // reset
    var i = 0;
    $('[data-biginjapan]').each(function(){
      var $this = $(this),
      isincontainer = $this.data('biginjapan-isincontainer');
      $.fn.biginjapan.wrappers[i] = {
       el : $this,
       isincontainer : isincontainer,
       excludeitemsfromheight : $this.data('biginjapan-excludeitemsfromheight'),
       percentheight : $this.data('biginjapan-percentheight') === undefined ? 1 : Number($this.data('biginjapan-percentheight'))
      }
      if(isincontainer==true){
        $.fn.biginjapan.wrappers[i].myparent = $this.parent();
      }
      i++;
    });

  }

  $.fn.biginjapan.excludeitemfromheight = function(excludeitemfromheight){
    var _excludeheight = 0;
    $(excludeitemfromheight).each(function(){
     _excludeheight += $(this).outerHeight();
    });
    return _excludeheight;

  }

  $.fn.biginjapan.wrappers = [];

  $.fn.biginjapan.resize = function(){

    var _w = $(window).width(),
    _h = $(window).height();

    for(var i=0;i<$.fn.biginjapan.wrappers.length;i++){
      var e = $.fn.biginjapan.wrappers[i];
      var c = $.fn.biginjapan.excludeitemfromheight(e.excludeitemsfromheight);
      if(e.isincontainer==true){
        e.el.css({ 'width':e.myparent.width(), 'height':(e.myparent.height()-c)*e.percentheight });
      } else {
{'fraction_non_alphanumeric': 0.23001427551748752, 'fraction_numerical': 0.004996431120628123, 'mean_word_length': 3.579248366013072, 'pattern_counts': {'":': 0, '<': 7, '<?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': '5289121', 'n_tokens_mistral': 1783, 'n_tokens_neox': 1639, 'n_words': 307}