<commit_before>(function () {
  var obj = ephox.bolt.kernel.fp.object;
  var obj = ephox.bolt.kernel.fp.object;
  var api = ephox.bolt.module.api;
  var builtins = ephox.bolt.module.config.builtins.browser;
  var install = ephox.bolt.module.bootstrap.install;
  var transport = ephox.bolt.loader.transporter.xhr.request;
  var script = ephox.bolt.loader.api.scripttag.load;
  var configloader = ephox.bolt.module.bootstrap.configloader;

  var withAttr = function (attr, f, otherwise) {
    var scripts = document.getElementsByTagName('script');
    for (var i = 0; i < scripts.length; ++i)
      if (scripts[i].hasAttribute(attr))
        return f(scripts[i].getAttribute(attr));
    return otherwise();
  };

  var withConfig = function (f, otherwise) {
    return withAttr('data-bolt-config', f, otherwise);
  };

  var withMain = function (f, otherwise) {
    return withAttr('data-bolt-main', f, otherwise);
  };

  var withGlobals = function (f, otherwise) {
    return withAttr('data-bolt-globals', f, otherwise);
  };

  var reader = withConfig(function (path) {
    return configloader.page(path);
  }, function () {
    return configloader.empty;<commit_msg>Tightened up bootstrap to look at only running script.<commit_after>(function () {
  var obj = ephox.bolt.kernel.fp.object;
  var api = ephox.bolt.module.api;
  var builtins = ephox.bolt.module.config.builtins.browser;
  var install = ephox.bolt.module.bootstrap.install;
  var transport = ephox.bolt.loader.transporter.xhr.request;
  var script = ephox.bolt.loader.api.scripttag.load;
  var configloader = ephox.bolt.module.bootstrap.configloader;

  var withAttr = function (attr, f, otherwise) {
    var scripts = document.getElementsByTagName('script');
    var last = scripts[scripts.length - 1];
    return last && last.hasAttribute(attr)) ?
      f(last.getAttribute(attr)) : otherwise();
  };

  var withConfig = function (f, otherwise) {
    return withAttr('data-bolt-config', f, otherwise);
  };

  var withMain = function (f, otherwise) {
    return withAttr('data-bolt-main', f, otherwise);
  };

  var withGlobals = function (f, otherwise) {
    return withAttr('data-bolt-globals', f, otherwise);
  };

  var reader = withConfig(function (path) {
    return configloader.page(path);
  }, function () {
    return configloader.empty;
{'fraction_non_alphanumeric': 0.1365010799136069, 'fraction_numerical': 0.0008639308855291577, 'mean_word_length': 3.804979253112033, 'pattern_counts': {'":': 0, '<': 4, '<?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': '5185816', 'n_tokens_mistral': 770, 'n_tokens_neox': 736, 'n_words': 166}