<commit_before>(function($){
  'use strict';

  var $menu = $('#menu'),
    currentVittle;

  var cancelVittle = function(){
    if (currentVittle){
      currentVittle.abortRequest();
      currentVittle = null;
      console.log('canceled');
    }
  };

  var onProductHover = function(){
    cancelVittle();
    Preview.showSpinner();

    currentVittle = new Vittle(this);
    console.log(currentVittle.tokens());

    currentVittle.getImageUrl().then(
      function(url){
        console.log(url);
        Preview.showImage(url);
      },
      function(error){
        console.log(error);
        Preview.showFail();
      }
    );
  };

  // http://cherne.net/brian/resources/jquery.hoverIntent.html
  $menu.hoverIntent({
    selector: '[name="product"]',
    sensitivity: 4,
    over: onProductHover,
    out: function(){
      Preview.hide();
      cancelVittle();
    }
  });
})(jQuery);<commit_msg>enable for Most Liked Items in sidebar<commit_after>(function($){
  'use strict';

  var currentVittle;

  var cancelVittle = function(){
    if (currentVittle){
      currentVittle.abortRequest();
      currentVittle = null;
      console.log('canceled');
    }
  };

  var onProductHover = function(){
    cancelVittle();
    Preview.showSpinner();

    currentVittle = new Vittle(this);
    console.log(currentVittle.tokens());

    currentVittle.getImageUrl().then(
      function(url){
        console.log(url);
        Preview.showImage(url);
      },
      function(error){
        console.log(error);
        Preview.showFail();
      }
    );
  };

  // http://cherne.net/brian/resources/jquery.hoverIntent.html
  $('body').hoverIntent({
    // TODO #mostOrderedItems
    selector: '#menu [name="product"],#mostLikedItems td.main a',
    sensitivity: 4,
    over: onProductHover,
    out: function(){
      Preview.hide();
      cancelVittle();
    }
  });
})(jQuery);
{'fraction_non_alphanumeric': 0.1568627450980392, 'fraction_numerical': 0.0010598834128245894, 'mean_word_length': 2.7238658777120315, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1403373', 'n_tokens_mistral': 607, 'n_tokens_neox': 584, 'n_words': 98}