<commit_before>/*
 * LICENSE: AGPL-3
 * Copyright 2016, Internet Archive
 */
(function() {
  var enforceBannerInterval;
  var archiveLinkWasClicked = false;
  var bannerWasShown = false;
  var bannerWasClosed = false;

  /**
   * Brute force inline css style reset
   */
  function resetStyesInline(el) {
    el.style.margin = 0;
    el.style.padding = 0;
    el.style.border = 0;
    el.style.fontSize = "100%";
    el.style.font = "inherit";
    el.style.verticalAlign = "baseline";
    el.style.lineHeight = "1";
    el.style.boxSizing = "content-box";
    el.style.overflow = "auto";
    el.style.fontWeight = "inherit";
    el.style.height = "auto";
    el.style.position = "relative";
    el.style.width = "auto";
    el.style.display = "inline";
    el.style.backgroundColor = "transparent";
    el.style.color = "#333";
    el.style.textAlign = "left";
  }

  /**
   * Communicates with background.js
   * @param action {string}
   * @param complete {function}
   */
  function sendTelemetry(action, complete) {
    chrome.runtime.sendMessage({action: action}, complete);
  }

  /**
   * @param {string} type
   * @param {function} handler(el)
   * @param remaining args are children
   * @returns {object} DOM element
   */
  function createEl(type, handler) {
    var el = document.createElement(type);
    resetStyesInline(el);
    if (handler !== undefined) {
      handler(el);
    }
    // Append *args to created el
    for (var i = 2; i < arguments.length; i++) {
      el.appendChild(arguments[i]);
    }
    return el;
  }

  function createBanner(wayback_url) {
    if (document.getElementById("no-more-404s-message") !== null) {
      return;
    }
    document.body.appendChild(
      createEl("div",
        function(el) {
          el.id = "no-more-404s-message";
          el.style.position = "fixed";
          el.style.top = "0";
          el.style.left = "0";
          el.style.width = "100%";
          el.style.minHeight = "50px";
          el.style.borderBottom = "1px solid rgba(0,0,0,.3)"
          el.style.boxSizing = "border-box";
          el.style.display = "flex";
          el.style.alignItems = "center";
          el.style.justifyContent = "space-between";
          el.style.padding = "5px 14px 5px 12px";
          el.style.background = "linear-gradient(#FBFBFB, #E6E6E6)";
          el.style.color =  "#333";
          el.style.font =  "14px message-box, sans-serif";
          el.style.transition =  "transform 150ms cubic-bezier(.1,.7,.15,1)";
          el.style.transform =  "translate(0, -100%)";
          el.style.zIndex =  "999999999";
          el.style.overflow = "hidden";
        },
        createEl("img", function(el) {
          el.src = chrome.extension.getURL("images/insetIcon.svg");<commit_msg>Minor syntax and style fix<commit_after>/*
 * LICENSE: AGPL-3
 * Copyright 2016, Internet Archive
 */
(function() {
  var enforceBannerInterval;
  var archiveLinkWasClicked = false;
  var bannerWasShown = false;
  var bannerWasClosed = false;

  /**
   * Brute force inline css style reset
   */
  function resetStyesInline(el) {
    el.style.margin = 0;
    el.style.padding = 0;
    el.style.border = 0;
    el.style.fontSize = "100%";
    el.style.font = "inherit";
    el.style.verticalAlign = "baseline";
    el.style.lineHeight = "1";
    el.style.boxSizing = "content-box";
    el.style.overflow = "auto";
    el.style.fontWeight = "inherit";
    el.style.height = "auto";
    el.style.position = "relative";
    el.style.width = "auto";
    el.style.display = "inline";
    el.style.backgroundColor = "transparent";
    el.style.color = "#333";
    el.style.textAlign = "left";
  }

  /**
   * Communicates with background.js
   * @param action {string}
   * @param complete {function}
   */
  function sendTelemetry(action, complete) {
    chrome.runtime.sendMessage({action: action}, complete);
  }

  /**
   * @param {string} type
   * @param {function} handler(el)
   * @param remaining args are children
   * @returns {object} DOM element
   */
  function createEl(type, handler) {
    var el = document.createElement(type);
    resetStyesInline(el);
    if (handler !== undefined) {
      handler(el);
    }
    // Append *args to created el
    for (var i = 2; i < arguments.length; i++) {
      el.appendChild(arguments[i]);
    }
    return el;
  }

  function createBanner(wayback_url) {
    if (document.getElementById("no-more-404s-message") !== null) {
      return;
    }
    document.body.appendChild(
      createEl("div",
        function(el) {
          el.id = "no-more-404s-message";
          el.style.position = "fixed";
          el.style.top = "0";
          el.style.left = "0";
          el.style.width = "100%";
          el.style.minHeight = "50px";
          el.style.borderBottom = "1px solid rgba(0,0,0,.3)";
          el.style.boxSizing = "border-box";
          el.style.display = "flex";
          el.style.alignItems = "center";
          el.style.justifyContent = "space-between";
          el.style.padding = "5px 14px 5px 12px";
          el.style.background = "linear-gradient(#FBFBFB, #E6E6E6)";
          el.style.color = "#333";
          el.style.font = "14px message-box, sans-serif";
          el.style.transition = "transform 150ms cubic-bezier(.1,.7,.15,1)";
          el.style.transform = "translate(0, -100%)";
          el.style.zIndex = "999999999";
          el.style.overflow = "hidden";
        },
        createEl("img", function(el) {
          el.src = chrome.extension.getURL("images/insetIcon.svg");
{'fraction_non_alphanumeric': 0.15335868187579213, 'fraction_numerical': 0.024986420423682782, 'mean_word_length': 2.414091470951792, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '1319425', 'n_tokens_mistral': 1910, 'n_tokens_neox': 1800, 'n_words': 361}