PageSourceSearch

http://triplunch.com/js/check_assist.js

js triplunch.com collected 2026-09-30 17:17:45 UTC 1,240 bytes, 35 lines download raw bytes

1$(document).ready(function(){
2  $('.assist__inputname').on('input', function(){
3    var validvalue = toValidValue($(this).val());
4    $(this).val(validvalue);
5    var isValidForm = true;
6    var $form = $(this).closest('form');
7    $form.find('.assist__inputname').each(function(i, e){
8      isValidForm = isValidForm && $(e).val().length > 0;
9    });
10    $form.find('.btn_submit').prop('disabled', !isValidForm);
11  })
12
13  $('.modal form').on('submit', function(){
14    return $(this).find('.btn_submit').prop('disabled') ? false : true;
15  })
16
17  function toValidValue(val){
18    var validvalue = '';
19    var val = val.toLowerCase().replace(/\s+/g, '');
20    var replacer = { 
21      й : 'q', ц : 'w', у : 'e', к : 'r', е : 't',
22      н : 'y', г : 'u', ш : 'i', щ : 'o', з : 'p',
23      ф : 'a', ы : 's', в : 'd', а : 'f', п : 'g',
24      р : 'h', о : 'j', л : 'k', д : 'l', я : 'z',
25      ч : 'x', с : 'c', м : 'v', и : 'b', т : 'n',
26      ь : 'm',
27    };
28    for(var i = 0; i < val.length; i++){
29        var symbol = val.charAt(i);
30        validvalue += replacer[symbol] ? replacer[symbol] : symbol;
31    }
32    validvalue = validvalue.replace(/[^\w]/g, '').replace(/\d/g, '');
33    return validvalue.toUpperCase();
34  }
35});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.