PageSourceSearch

https://www.maryscenter.org/wp-content/themes/mc/js/mobile-phone.js

js maryscenter.org collected 2026-09-24 09:24:43 UTC 1,526 bytes, 41 lines download raw bytes

1$(document).ready(function(){
2if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
3
4var countrycodes = "1"
5var delimiters = "-|\\.|—|–| "
6var phonedef = "\\+?(?:(?:(?:" + countrycodes + ")(?:\\s|" + delimiters + ")?)?\\(?[2-9]\\d{2}\\)?(?:\\s|" + delimiters + ")?[2-9]\\d{2}(?:" + delimiters + ")?[0-9a-z]{4})"
7var spechars = new RegExp("([- \(\)\.:]|\\s|" + delimiters + ")","gi") //Special characters to be removed from the link
8var phonereg = new RegExp("((^|[^0-9])(href=[\"']tel:)?((?:" + phonedef + ")[\"'][^>]*?>)?(" + phonedef + ")($|[^0-9]))","gi")
9
10function ReplacePhoneNumbers(oldhtml) {
11//Created by Jon Meck at LunaMetrics.com - Version 1.0
12var newhtml = oldhtml.replace(/href=['"]callto:/gi,'href="tel:')
13newhtml = newhtml.replace(phonereg, function ($0, $1, $2, $3, $4, $5, $6) {
14    if ($3) return $1;
15    else if ($4) return $2+$4+$5+$6;
16    else return $2+""+$5+""+$6; });
17return newhtml;
18}
19
20if ($('#address').length) {
21    $("#address").html(ReplacePhoneNumbers($("#address").html()))
22}
23
24$("a[href^='tel:']").click(function(event){
25     event.preventDefault();
26
27     link  = $(this).attr('href');
28     tracklink = link.replace("tel:","")
29     tracklink = tracklink.replace(spechars,"")
30     if(tracklink.length == 10) {tracklink = "1" + tracklink}
31
32     ga('send', 'event', 'Contact', 'Phone', tracklink);
33     //_gaq.push(['_trackEvent', 'Contact', 'Phone', tracklink]);
34
35     setTimeout(function() {
36        window.location = link;
37     },300);
38});
39}
40})
41

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.