<commit_before>/* Copyright (c) 2012-2015 The TagSpaces Authors. All rights reserved.
 * Use of this source code is governed by a AGPL3 license that
 * can be found in the LICENSE file. */
/* global define */

define(function(require, exports, module) {
  "use strict";

  console.log("Loading ioapi.cordova.js..");

  var TSCORE = require("tscore");
  var TSPOSTIO = require("tspostioapi");

  var attachFastClick = require('cordova/fastclick/fastclick.min');

  var fsRoot;

  var urlFromIntent;

  document.addEventListener("deviceready", onDeviceReady, false);
  document.addEventListener("resume", onDeviceResume, false);

  // Cordova loaded and can be used
  function onDeviceReady() {
    console.log("Device Ready:"); // "+device.platform+" - "+device.version);

    // Redifining the back button
    document.addEventListener("backbutton", function(e) {
      TSCORE.FileOpener.closeFile();
      $('.modal').modal('hide');
      e.preventDefault();
    }, false);

    // iOS specific initialization
    if (isCordovaiOS) {
      window.plugins = window.plugins || {};
      // TODO: use fileOpener2 plugin on all platforms
      // https://build.phonegap.com/plugins/1117
      window.plugins.fileOpener = cordova.plugins.fileOpener2;
    } 

    if (isCordovaAndroid) {

      if (window.plugins.webintent) {
        window.plugins.webintent.getUri(function(url) {
          urlFromIntent = url;
        });
      }
    }
    
    attachFastClick(document.body);
    getFileSystem();
  }

  function onDeviceResume() {
    //TODO: reload curtent dir after background operation
    TSCORE.IO.listDirectory(TSCORE.currentPath);
  }

  var handleStartParameters = function() {<commit_msg>TS75 - hide splashscreen plugin for ios<commit_after>/* Copyright (c) 2012-2015 The TagSpaces Authors. All rights reserved.
 * Use of this source code is governed by a AGPL3 license that
 * can be found in the LICENSE file. */
/* global define */

define(function(require, exports, module) {
  "use strict";

  console.log("Loading ioapi.cordova.js..");

  var TSCORE = require("tscore");
  var TSPOSTIO = require("tspostioapi");

  var attachFastClick = require('cordova/fastclick/fastclick.min');

  var fsRoot;

  var urlFromIntent;

  document.addEventListener("deviceready", onDeviceReady, false);
  document.addEventListener("resume", onDeviceResume, false);

  // Cordova loaded and can be used
  function onDeviceReady() {
    console.log("Device Ready:"); // "+device.platform+" - "+device.version);

    // Redifining the back button
    document.addEventListener("backbutton", function(e) {
      TSCORE.FileOpener.closeFile();
      $('.modal').modal('hide');
      e.preventDefault();
    }, false);

    // iOS specific initialization
    if (isCordovaiOS) {
      navigator.splashscreen.hide();
      window.plugins = window.plugins || {};
      // TODO: use fileOpener2 plugin on all platforms
      // https://build.phonegap.com/plugins/1117
      window.plugins.fileOpener = cordova.plugins.fileOpener2;
    } 

    if (isCordovaAndroid) {

      if (window.plugins.webintent) {
        window.plugins.webintent.getUri(function(url) {
          urlFromIntent = url;
        });
      }
    }
    
    attachFastClick(document.body);
    getFileSystem();
  }

  function onDeviceResume() {
    //TODO: reload curtent dir after background operation
    TSCORE.IO.listDirectory(TSCORE.currentPath);
  }

  var handleStartParameters = function() {
{'fraction_non_alphanumeric': 0.1266261925411969, 'fraction_numerical': 0.009251228678808905, 'mean_word_length': 3.2246642246642248, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '4198085', 'n_tokens_mistral': 1065, 'n_tokens_neox': 1012, 'n_words': 242}