PageSourceSearch

https://yucatan.gob.mx/js/funciones.js?v=260504

js yucatan.gob.mx collected 2026-09-24 09:10:39 UTC 2,559 bytes, 76 lines download raw bytes

1function emailValido(email) {
2    var emailExp = /^[\w\-\.\+]+\@[a-zA-Z0-9\.\-]+\.[a-zA-z0-9]{2,4}$/;
3    email = email.trim();
4    if (!email.match(emailExp)) return false;
5    else return true;
6}
7function telefonoValido(tel) {
8    var telExp = /^\(?([0-9]{3})\)?[ ]?([0-9]{3})[-]?([0-9]{4})$/;  
9    if(!tel.match(telExp)) return false;
10    return true;
11}
12function urlValido(url) {
13    if (/[-a-zA-Z0-9@:%_\+.~#?&//=]{2,256}\.[a-z]{2,}\b(\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?/gi.test(url)) {
14        return true;
15    } else {
16        return false;
17    } 
18}
19function checkDate(myDayStr, myMonthStr, myYearStr) {
20    myMonthStr = myMonthStr - 1;
21    var myDate = new Date();
22    myDate.setFullYear(myYearStr, myMonthStr, myDayStr);
23    if (myDate.getMonth()!=myMonthStr) return false;
24    else return true;
25}
26String.prototype.replaceAll = function(from, to)  {
27    var str = this;
28    while(str.indexOf(from)>=0) {
29        str = str.replace(from, to);
30    }
31    return str;
32}
33$.fn.hasAttr = function(name) {  
34   return this.attr(name) !== undefined;
35};
36$('.style-select').each(function() {
37    var div = $(this);
38    var sel = div.find('select');
39    sel.before('<button type="button" class="btn dropdown-toggle" data-toggle="dropdown" tabindex="0"><span class="option">---</span><span class="caret"></span></button>');
40    var span = div.find('.option');
41    div.append('<ul class="dropdown-menu"></ul>');
42    var ul = div.find('ul');
43    sel.find('option').each(function() {
44        var a = $('<a href="#">'+$(this).text()+'</a>');
45        var li = $('<li></li>');
46        if (this.hidden) {
47            li.addClass('no-display');
48        }
49        if (this.selected) {
50            li.addClass('selected');
51            span.text($(this).text());
52        }
53        li.append(a);
54        ul.append(li);
55    });
56    if ($(this).hasClass('disabled')) {
57        $(this).find('.dropdown-toggle').prop('disabled', true);
58        $(this).removeClass('disabled');
59    }
60});
61$(document).on('click', '.style-select a', function(e) {
62    e.preventDefault();
63    var a = $(this);
64    var li = a.parent();
65    var i = li.index();
66    var sel = a.closest('.style-select').find('select');
67    var ul = a.closest('.style-select').find('ul');
68    var span = a.closest('.style-select').find('.option');
69    span.text(a.text());
70    sel.find('option')[i].selected = true;
71    ul.find('li').each(function() {
72        $(this).removeClass('selected');
73    });
74    li.addClass('selected');
75    sel.change();
76});

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.