<commit_before>var $startingpoint = $('#startingpoint').click(function (event) {
  event.preventDefault();
  if (localStorage) {
    analytics.saveTemplate();
    localStorage.setItem('saved-javascript', editors.javascript.getCode());
    localStorage.setItem('saved-html', editors.html.getCode());
    localStorage.setItem('saved-css', editors.css.getCode());

    $document.trigger('tip', {
      type: 'notification',
      content: 'Starting template updated and saved',
      autohide: 3000
    });
  } else {
    $document.trigger('tip', {
      type: 'error',
      content: 'Saving templates isn\'t supported in this browser I\'m afraid. Sorry'
    });
  }
  return false;
});

// if (localStorage && localStorage['saved-html']) {
  // $startingpoint.append('')
// }

$('a.disabled').on('click mousedown mouseup', function (event) {
  event.stopImmediatePropagation();
  return false;
});

$('#loginbtn').click(function () {
  analytics.login();
  // $('#login').show();
  // loginVisible = true;
  $username.focus();
  // return false;
});

$('.logout').click(function (event) {
  event.preventDefault();

  // We submit a form here because I can't work out how to style the button
  // element in the form to look the same as the anchor. Ideally we would
  // remove that and just let the form submit itself...
  $(this.hash).submit();
});

$('.homebtn').click(function (event, data) {
  if (this.id === 'avatar') {
    analytics.openFromAvatar();
  } else if (this.id === 'profile') {
    analytics.openFromAvatar();
    $(this).closest('.open').removeClass('open');
  } else {
    analytics.open(data);
  }

  jsbin.panels.hideAll();
  return false;
});

var $lockrevision = $('.lockrevision').on('click', function (event) {
  event.preventDefault();
  if (!$lockrevision.data('lock')) {
    analytics.lock();
    $lockrevision.removeClass('icon-unlocked').addClass('icon-lock');
    $lockrevision.html('<span>This bin is now locked from further changes</span>');
    $lockrevision.data('locked', true);
    saveChecksum = false;
    $document.trigger('locked');
  }
  return false;
}).on('mouseup', function () {
  return false;
});<commit_msg>Clearing sessionStorage so private bins won't be cached<commit_after>var $startingpoint = $('#startingpoint').click(function (event) {
  event.preventDefault();
  if (localStorage) {
    analytics.saveTemplate();
    localStorage.setItem('saved-javascript', editors.javascript.getCode());
    localStorage.setItem('saved-html', editors.html.getCode());
    localStorage.setItem('saved-css', editors.css.getCode());

    $document.trigger('tip', {
      type: 'notification',
      content: 'Starting template updated and saved',
      autohide: 3000
    });
  } else {
    $document.trigger('tip', {
      type: 'error',
      content: 'Saving templates isn\'t supported in this browser I\'m afraid. Sorry'
    });
  }
  return false;
});

// if (localStorage && localStorage['saved-html']) {
  // $startingpoint.append('')
// }

$('a.disabled').on('click mousedown mouseup', function (event) {
  event.stopImmediatePropagation();
  return false;
});

$('#loginbtn').click(function () {
  analytics.login();
  // $('#login').show();
  // loginVisible = true;
  $username.focus();
  // return false;
});

$('.logout').click(function (event) {
  event.preventDefault();

  // We submit a form here because I can't work out how to style the button
  // element in the form to look the same as the anchor. Ideally we would
  // remove that and just let the form submit itself...
  $(this.hash).submit();
  // Clear session storage so private bins wont be cached.
  for (i = 0; i < sessionStorage.length; i++) {
    key = sessionStorage.key(i);
    if (key.indexOf('jsbin.content.') === 0) {
      sessionStorage.removeItem(key);
    }
  }
});

$('.homebtn').click(function (event, data) {
  if (this.id === 'avatar') {
    analytics.openFromAvatar();
  } else if (this.id === 'profile') {
    analytics.openFromAvatar();
    $(this).closest('.open').removeClass('open');
  } else {
    analytics.open(data);
  }

  jsbin.panels.hideAll();
  return false;
});

var $lockrevision = $('.lockrevision').on('click', function (event) {
  event.preventDefault();
  if (!$lockrevision.data('lock')) {
    analytics.lock();
    $lockrevision.removeClass('icon-unlocked').addClass('icon-lock');
    $lockrevision.html('<span>This bin is now locked from further changes</span>');
    $lockrevision.data('locked', true);
    saveChecksum = false;
    $document.trigger('locked');
  }
  return false;
}).on('mouseup', function () {
  return false;
});
{'fraction_non_alphanumeric': 0.1816597691134829, 'fraction_numerical': 0.0021781746896101066, 'mean_word_length': 3.729145211122554, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 7, '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': '4308044', 'n_tokens_mistral': 1428, 'n_tokens_neox': 1412, 'n_words': 330}