<commit_before>//browser-update.org notification script, <browser-update.org>
//Copyright (c) 2007-2009, MIT Style License <browser-update.org/LICENSE.txt>

(function() {

var $buo = function() {

  var badAndroid = false, ua = null;

  // Sometimes we have to resort to parsing the user agent string. :(
  if (navigator && navigator.userAgent) {
    ua = navigator.userAgent;
  }
  if (ua && (ua.indexOf('Android 2.2') >= 0 || ua.indexOf('Android 2.3') >= 0)) {
    // Android 2.2 and 2.3 browsers report that they have pushState, but they don't really.
    // See http://caniuse.com/#search=pushstate
    badAndroid = true;
  }

  // sam: my main concern here is mobile, but its an outlier, for now we support ie9, set conditionally and stuff with pushState
  if (window.ie === "new" || (window.history && window.history.pushState && !badAndroid)) {
      return;
  }

  // retrieve localized browser upgrade text
  var t = <%= "'" + I18n.t('js.browser_update') + "'" %>;

  // create the notification div HTML
  var div = document.createElement("div");
  div.className = "buorg";
  div.innerHTML = "<div>" + t + "</div>";

  // create the notification div stylesheet
  var sheet = document.createElement("style");
  var style = ".buorg {position:absolute; z-index:111111; width:100%; top:0px; left:0px; background:#FDF2AB; text-align:left; font-family: sans-serif; color:#000; font-size: 14px;} .buorg div {padding: 8px;} .buorg a, .buorg a:visited {color:#E25600; text-decoration: underline;}";

  // insert the div and stylesheet into the DOM
  document.body.insertBefore(div, document.body.firstChild);
  document.getElementsByTagName("head")[0].appendChild(sheet);
  try {
    sheet.innerText = style;
    sheet.innerHTML = style;
  }
  catch(e) {
    try {
      sheet.styleSheet.cssText = style;
    }
    catch(ex) {
      return;
    }
  }<commit_msg>Googlebot seems to parse Javascript and inserts our browser update message into their search results. If our client is googlebot, don't tell them to update their browser.<commit_after>//browser-update.org notification script, <browser-update.org>
//Copyright (c) 2007-2009, MIT Style License <browser-update.org/LICENSE.txt>

(function() {

var $buo = function() {

  var badAndroid = false, ua = null;

  // Sometimes we have to resort to parsing the user agent string. :(
  if (navigator && navigator.userAgent) {
    ua = navigator.userAgent;
  }
  if (ua && (ua.indexOf('Android 2.2') >= 0 || ua.indexOf('Android 2.3') >= 0)) {
    // Android 2.2 and 2.3 browsers report that they have pushState, but they don't really.
    // See http://caniuse.com/#search=pushstate
    badAndroid = true;
  }

  // sam: my main concern here is mobile, but its an outlier, for now we support ie9, set conditionally and stuff with pushState
  if (window.ie === "new" || (window.history && window.history.pushState && !badAndroid)) {
      return;
  }

  // we don't ask Googlebot to update their browser
  if (ua.indexOf('Googlebot') >= 0) {
      return;
  }

  // retrieve localized browser upgrade text
  var t = <%= "'" + I18n.t('js.browser_update') + "'" %>;

  // create the notification div HTML
  var div = document.createElement("div");
  div.className = "buorg";
  div.innerHTML = "<div>" + t + "</div>";

  // create the notification div stylesheet
  var sheet = document.createElement("style");
  var style = ".buorg {position:absolute; z-index:111111; width:100%; top:0px; left:0px; background:#FDF2AB; text-align:left; font-family: sans-serif; color:#000; font-size: 14px;} .buorg div {padding: 8px;} .buorg a, .buorg a:visited {color:#E25600; text-decoration: underline;}";

  // insert the div and stylesheet into the DOM
  document.body.insertBefore(div, document.body.firstChild);
  document.getElementsByTagName("head")[0].appendChild(sheet);
  try {
    sheet.innerText = style;
    sheet.innerHTML = style;
  }
  catch(e) {
    try {
      sheet.styleSheet.cssText = style;
    }
    catch(ex) {
      return;
    }
  }
{'fraction_non_alphanumeric': 0.1456140350877193, 'fraction_numerical': 0.02280701754385965, 'mean_word_length': 3.479236812570146, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 18, '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': '6952939', 'n_tokens_mistral': 1352, 'n_tokens_neox': 1245, 'n_words': 376}