<commit_before>/**
 *
 * 音乐搜索器 - JS 文件
 *
 * @author  MaiCong <<EMAIL>>
 * @link    https://github.com/maicong/music
 * @since   1.5.0
 *
 */

$(function() {
  var _this = this;
  var player = null;
  var nopic = 'static/img/nopic.jpg';

  // Tab 切换
  $('#j-form').on('click', 'li', function() {
    var holder = {
      name: '例如: 不要说话 陈奕迅',
      id: '例如: 25906124',
      url: '例如: http://music.163.com/#/song?id=25906124',
      pattern_name: '^.+$',
      pattern_id: '^[\\w\\/\\|]+$',
      pattern_url: '^https?:\\/\\/\\S+$'
    };
    var filter = $(_this).data('filter');

    $(_this)
      .addClass('am-active')
      .siblings('li')
      .removeClass('am-active');

    $('#j-input')
      .data('filter', filter)
      .attr({
        placeholder: holder[filter],
        pattern: holder['pattern_' + filter]
      })
      .removeClass('am-field-valid am-field-error am-active')
      .closest('.am-form-group')
      .removeClass('am-form-success am-form-error')
      .find('.am-alert')
      .hide();

    if (filter === 'url') {
      $('#j-type').hide();
    } else {
      $('#j-type').show();
    }
  });<commit_msg>修复 this 函数问题<commit_after>/**
 *
 * 音乐搜索器 - JS 文件
 *
 * @author  MaiCong <<EMAIL>>
 * @link    https://github.com/maicong/music
 * @since   1.5.1
 *
 */

$(function() {
  var player = null;
  var nopic = 'static/img/nopic.jpg';

  // Tab 切换
  $('#j-form').on('click', 'li', function() {
    var holder = {
      name: '例如: 不要说话 陈奕迅',
      id: '例如: 25906124',
      url: '例如: http://music.163.com/#/song?id=25906124',
      pattern_name: '^.+$',
      pattern_id: '^[\\w\\/\\|]+$',
      pattern_url: '^https?:\\/\\/\\S+$'
    };
    var filter = $(this).data('filter');

    $(this)
      .addClass('am-active')
      .siblings('li')
      .removeClass('am-active');

    $('#j-input')
      .data('filter', filter)
      .attr({
        placeholder: holder[filter],
        pattern: holder['pattern_' + filter]
      })
      .removeClass('am-field-valid am-field-error am-active')
      .closest('.am-form-group')
      .removeClass('am-form-success am-form-error')
      .find('.am-alert')
      .hide();

    if (filter === 'url') {
      $('#j-type').hide();
    } else {
      $('#j-type').show();
    }
  });
{'fraction_non_alphanumeric': 0.2385809312638581, 'fraction_numerical': 0.01951219512195122, 'mean_word_length': 2.1117241379310343, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '873800', 'n_tokens_mistral': 910, 'n_tokens_neox': 891, 'n_words': 145}