<commit_before>shen_web = (function() {
  var files = ["web/util.js", "web/jsfile.js", "web/fs.js", "web/edit.js",
               "web/repl.js", "web/embed.js", "web/store.js", "shen.js",
               "web/loader_github.js"];
  var self = {}, init_status;
  self.plugins = [];
  self.set_init_status = function(s) {
    init_status.innerHTML = "";
    init_status.appendChild(document.createTextNode(s));
  };

  self.init = function(opts) {
    self.opts = opts = opts || {};
    var ondone = opts.ondone;

    function init_plugins(i, done) {
      if (i < self.plugins.length)
        self.plugins[i](function() {init_plugins(i + 1, done);});
      else
        done();
    }

    function script(file, fn) {
      var s = document.createElement("script")
      s.type = "text/javascript";
      s.src = file;
      s.async = true;
      document.head.appendChild(s);
    }
    files.forEach(script);

    function apply_hash() {
      var path = location.hash.replace(/^#/, "");
      if (path === "")
        shen_web.edit.unload();
      else
        shen_web.edit.load(shen_web.fs.root, path);
      shen_web.fs.select(path);
    }

    function onerror(msg) {
      var p = document.getElementById("wait_pane"),
          t = document.getElementById("wait_text"),
          img = document.getElementById("wait_progress");
      p.classList.add("wait_error");
      while (t.firstChild)
        t.removeChild(t.firstChild);
      t.appendChild(document.createTextNode("Error occured: " + msg));
      p.removeChild(img);
    }

    function done() {
      window.onhashchange = apply_hash;<commit_msg>[web] Fixed double-removing of splash element caused exception on Firefox.<commit_after>shen_web = (function() {
  var files = ["web/util.js", "web/jsfile.js", "web/fs.js", "web/edit.js",
               "web/repl.js", "web/embed.js", "web/store.js", "shen.js",
               "web/loader_github.js"];
  var self = {}, init_status;
  self.plugins = [];
  self.set_init_status = function(s) {
    init_status.innerHTML = "";
    init_status.appendChild(document.createTextNode(s));
  };

  self.init = function(opts) {
    self.opts = opts = opts || {};
    var ondone = opts.ondone;

    function init_plugins(i, done) {
      if (i < self.plugins.length)
        self.plugins[i](function() {init_plugins(i + 1, done);});
      else
        done();
    }

    function script(file, fn) {
      var s = document.createElement("script")
      s.type = "text/javascript";
      s.src = file;
      s.async = true;
      document.head.appendChild(s);
    }
    files.forEach(script);

    function apply_hash() {
      var path = location.hash.replace(/^#/, "");
      if (path === "")
        shen_web.edit.unload();
      else
        shen_web.edit.load(shen_web.fs.root, path);
      shen_web.fs.select(path);
    }

    function onerror(msg) {
      var p = document.getElementById("wait_pane"),
          t = document.getElementById("wait_text"),
          img = document.getElementById("wait_progress");
      p.classList.add("wait_error");
      while (t.firstChild)
        t.removeChild(t.firstChild);
      t.appendChild(document.createTextNode("Error occured: " + msg));
      if (img && img.parentNode === p)
        p.removeChild(img);
    }

    function done() {
      window.onhashchange = apply_hash;
{'fraction_non_alphanumeric': 0.16195063214930763, 'fraction_numerical': 0.0006020469596628537, 'mean_word_length': 2.5313496280552603, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5764714', 'n_tokens_mistral': 1090, 'n_tokens_neox': 1075, 'n_words': 188}