<commit_before>{literal}
<script type="text/javascript">
/*
 * backend contribute search, individual
 *   
 */
/*jslint indent: 2 */
/*global CRM, ts */

cj(function ($) {
  'use strict';
  var boLinks = $('form#Search input[name=extra_backoffice_links]');
  if (0 < boLinks.length) {
    var backofficeLinks = cj.parseJSON(boLinks.val());
    $.each(backofficeLinks, function(index, value) {
       $('form#Search #help').after(' <a style="color: #F88;" class="button" href="'+value.url+'">'+value.title+'</a>');
    });
  }
});<commit_msg>helper js for contrionrecur extension<commit_after>{literal}
<script type="text/javascript">
/*
 * backend contribute search, individual
 *   
 */
/*jslint indent: 2 */
/*global CRM, ts */

cj(function ($) {
  'use strict';
  var boLinks = $('form#Search input[name=extra_backoffice_links]');
  if (0 < boLinks.length) {
    var backofficeLinks = cj.parseJSON(boLinks.val());
    $.each(backofficeLinks, function(index, value) {
       $('form#Search #help').after(' <a style="color: #F88;" class="button" href="'+value.url+'">'+value.title+'</a>');
    });
  }
  var recurVars = ('contributionrecur' in CRM) ? CRM.contributionrecur : (('vars' in CRM) ? CRM.vars.contributionrecur : null);
  if ('undefined' !== typeof recurVars.recur_edit_url) {
    $("table td:contains('Cancelled')").each(function() {
      if ($(this).html() == 'Cancelled') {
        var myId = $(this).parent()[0].id;
        if ('row_' == myId.substring(0,4)) {
          myId = myId.substr(4);
          $(this).append(' | <a href="'+decodeURI(recurVars.recur_edit_url) + myId + '">Edit</a>');
          console.log(decodeURI(recurVars.recur_edit_url) + myId);
        }
      }
    });
  }
});
{'fraction_non_alphanumeric': 0.2064327485380117, 'fraction_numerical': 0.007017543859649123, 'mean_word_length': 3.7927170868347337, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, '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': '7239101', 'n_tokens_mistral': 610, 'n_tokens_neox': 591, 'n_words': 111}