PageSourceSearch

https://abrasilmotoboys.com/js/mascara.js?v=1786017944

js abrasilmotoboys.com collected 2026-10-02 01:21:22 UTC 1,688 bytes, 70 lines download raw bytes

1
2function mascaraCnpj() {
3    $("#cnpj").mask("AA.AAA.AAA/AAAA-00", {
4        translation: {
5            "A": { pattern: /[0-9A-Za-z]/ },
6            "0": { pattern: /[0-9]/ }
7        },
8        onKeyPress: function (val, e, field) {
9            field.val(val.toUpperCase());
10        }
11    });
12    $("#cnpj").css("text-transform", "uppercase");
13}
14function mascaraCpf() {
15
16    $("#cpf").mask("999.999.999-99");
17}
18function mascaraCep() {
19
20    $("#cep").mask("99.999-999");
21}
22function mascaraCepID(nomeCampo) {
23//       alert('id '+id);
24    $('#' + nomeCampo).mask("99.999-999");
25}
26
27function mascaraTel(nomeCampo) {
28
29    var campo = $("#" + nomeCampo);
30    var opcoes = {
31        onKeyPress: function (valor, evento, field, options) {
32            field.mask(retornaMascaraTelefone(valor), options);
33        }
34    };
35
36    campo.mask(retornaMascaraTelefone(campo.val()), opcoes);
37
38}
39
40function retornaMascaraTelefone(valor) {
41    var numeros = (valor || '').replace(/\D/g, '');
42
43    if (numeros.length > 10) {
44        return '(00) 00000-0000';
45    }
46
47    return '(00) 0000-00009';
48}
49
50function formataNumero(nomeCampo) {
51
52    var campo = $('#' + nomeCampo);
53    campo.mask(retornaMascaraTelefone(campo.val()));
54
55}
56
57function mascaraJavascript(o, f) {
58    v_obj = o
59    v_fun = f
60    setTimeout("execmascara()", 1)
61}
62function execmascara() {
63    v_obj.value = v_fun(v_obj.value)
64}
65function mtel(v) {
66    v = v.replace(/\D/g, "");             //Remove tudo o que não é dígito
67    v = v.replace(/^(\d{2})(\d)/g, "($1) $2"); //Coloca parênteses em volta dos dois primeiros dígitos
68    v = v.replace(/(\d)(\d{4})$/, "$1-$2");    //Coloca hífen entre o quarto e o quinto dígitos
69    return v;
70}

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.