<commit_before>(function () {
  "use strict";
  var root = this,
      $ = root.jQuery;

  if(typeof root.GOVUK === 'undefined') { root.GOVUK = {}; }

  var doubleClickProtection = function () {
    $('form input[type=submit]').on('click', function () {
      var submit = $(this),
          name = submit.attr('name'),
          value = submit.val();

      submit.before('<input type="hidden" name="' + name + '" value="' + value + '">');
      submit.attr('disabled', 'disabled');
      submit.closest('form').submit();
    });
  }

  root.GOVUK.doubleClickProtection = doubleClickProtection;<commit_msg>Quick fix to restore admin delete confirmations.<commit_after>(function () {
  "use strict";
  var root = this,
      $ = root.jQuery;

  if(typeof root.GOVUK === 'undefined') { root.GOVUK = {}; }

  var doubleClickProtection = function () {
    $('form input[type=submit]').live('click', function () {
      var submit = $(this),
          name = submit.attr('name'),
          value = submit.val();

      if (submit.data('confirm')) {
        return;
      }

      submit.before('<input type="hidden" name="' + name + '" value="' + value + '">');
      submit.attr('disabled', 'disabled');
      submit.closest('form').submit();
    });
  }

  root.GOVUK.doubleClickProtection = doubleClickProtection;
{'fraction_non_alphanumeric': 0.18978658536585366, 'fraction_numerical': 0.0, 'mean_word_length': 2.9908814589665655, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '7056011', 'n_tokens_mistral': 403, 'n_tokens_neox': 388, 'n_words': 78}