<commit_before>// Copyright (c) 2015-2016, <NAME>. All rights reserved.
/* global KeyEvent, Swiper */
/* jshint moz:true, esnext:true */

(function() {
'use strict';

var inputContext = null,
    mgmt = window.navigator.mozInputMethod.mgmt,
    formInputType = null,
    formInputMode = null,
    formLang = null;

var keyboardElement = document.getElementById('keyboard'),
    suggExpandButton = document.getElementById('suggExpandButton'),
    wordSuggestsElement = document.getElementById('wordSuggests'),
    keyContainer = document.getElementById('keyContainer'),
    swipeContainer = new Swiper(keyContainer),
    cachedWindowHeight = screen.availHeight,
    cachedWindowWidth = screen.availWidth;


function jakInit() {
  keyboardElement.addEventListener('mousedown', function onMouseDown(ev) {
    ev.preventDefault();
  }, false);

  swipeContainer.start();
  swipeContainer.ontouch = startKeyHandle;
  swipeContainer.onswiped = endKeyHandle;

  wordSuggestsElement.addEventListener('click', clickSuggestsBox, false);
  suggExpandButton.addEventListener('click', suggExpand, false);

  cachedWindowWidth = keyboardElement.clientWidth;
  cachedWindowHeight = keyboardElement.clientHeight;
  window.navigator.mozInputMethod.oninputcontextchange = function() {
    if (inputContext !== null) {
      Composer.clearCompose();
      toggleSuggestBox('collapse');
      TransferManager.resetSuggest();
      clearSuggests();
    }
    getInputContext();
    resizeWindow();
  };
<commit_msg>adjust flick threshold<commit_after>// Copyright (c) 2015-2016, <NAME>. All rights reserved.
/* global KeyEvent, Swiper */
/* jshint moz:true, esnext:true */

(function() {
'use strict';

var inputContext = null,
    mgmt = window.navigator.mozInputMethod.mgmt,
    formInputType = null,
    formInputMode = null,
    formLang = null;

var keyboardElement = document.getElementById('keyboard'),
    suggExpandButton = document.getElementById('suggExpandButton'),
    wordSuggestsElement = document.getElementById('wordSuggests'),
    keyContainer = document.getElementById('keyContainer'),
    swipeContainer = new Swiper(keyContainer),
    cachedWindowHeight = screen.availHeight,
    cachedWindowWidth = screen.availWidth;


function jakInit() {
  keyboardElement.addEventListener('mousedown', function onMouseDown(ev) {
    ev.preventDefault();
  }, false);

  swipeContainer.start();
  swipeContainer.ontouch = startKeyHandle;
  swipeContainer.onswiped = endKeyHandle;
  swipeContainer.threshold = 10;

  wordSuggestsElement.addEventListener('click', clickSuggestsBox, false);
  suggExpandButton.addEventListener('click', suggExpand, false);

  cachedWindowWidth = keyboardElement.clientWidth;
  cachedWindowHeight = keyboardElement.clientHeight;
  window.navigator.mozInputMethod.oninputcontextchange = function() {
    if (inputContext !== null) {
      Composer.clearCompose();
      toggleSuggestBox('collapse');
      TransferManager.resetSuggest();
      clearSuggests();
    }
    getInputContext();
    resizeWindow();
  };

{'fraction_non_alphanumeric': 0.11452145214521452, 'fraction_numerical': 0.005940594059405941, 'mean_word_length': 4.885436893203884, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1937235', 'n_tokens_mistral': 877, 'n_tokens_neox': 834, 'n_words': 158}