<commit_before>/* application entry point */

'use strict';

var ctrl = require('./ctrl');
var view = require('./view');
var m = require('mithril');

function main() {

  var controller = new ctrl();
  m.module(document.querySelector('body'), {
    controller: function () { return controller; },
    view: view
  });

  document.body.addEventListener('submit', function (e) {
    e.preventDefault();
  });

  document.addEventListener('backbutton', function (e) {
    // todo
    window.navigator.app.exitApp();
  }, false);


  if (window.cordova) {
    setTimeout(function() {
      window.navigator.splashscreen.hide();
    }, 2000);
  }

}
<commit_msg>Fix chessground size on start<commit_after>/* application entry point */

'use strict';

var ctrl = require('./ctrl');
var view = require('./view');
var m = require('mithril');

function main() {
  var controller = new ctrl();
  m.module(document.querySelector('body'), {
    controller: function () { return controller; },
    view: view
  });

  (function() {
    var size = (window.innerWidth) + 'px';
    setTimeout(function() {
      document.querySelector('.chessground').style.width = size;
      document.querySelector('.chessground').style.height = size;
    }, 50);
  })();

  document.body.addEventListener('submit', function (e) {
    e.preventDefault();
  });

  document.addEventListener('backbutton', function (e) {
    // todo
    window.navigator.app.exitApp();
  }, false);


  if (window.cordova) {
    setTimeout(function() {
      window.navigator.splashscreen.hide();
    }, 2000);
  }

}

{'fraction_non_alphanumeric': 0.1753826530612245, 'fraction_numerical': 0.006377551020408163, 'mean_word_length': 3.444759206798867, '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': '5473120', 'n_tokens_mistral': 482, 'n_tokens_neox': 467, 'n_words': 101}