PageSourceSearch

https://www.leonvalleytexas.gov/sites/default/files/js/js_-w-hL0_JOOeZ8ZH2nxOxZ_GLT0ehKXc3-k9blTO8mPc.js

js leonvalleytexas.gov collected 2026-10-02 10:35:47 UTC 13,009 bytes, 371 lines download raw bytes

1function updateAlts(){
2    var ol = document.getElementById('openlayers-map');
3    if(!ol)
4        ol = document.getElementById('openlayers-views-map');
5    if(!ol && document.getElementsByClassName('openlayers-views-map').length > 0)
6        ol = document.getElementsByClassName('openlayers-views-map').item(0);
7    if(!ol && document.getElementsByClassName('views-field-field-google-map').length > 0)
8        ol = document.getElementsByClassName('views-field-field-google-map').item(0);
9    
10    img_childs = ol.getElementsByTagName('img');
11    for(i = 0; i < img_childs.length; i++){
12        alt = img_childs.item(i).getAttribute('alt');
13        if(!alt || alt === null){
14            if(img_childs.item(i).getAttribute('id') !== null)
15                img_childs.item(i).setAttribute('alt', img_childs.item(i).id);
16            else
17                img_childs.item(i).setAttribute('alt', "map_marker_" + i);
18        }
19        if(img_childs.item(i).hasAttribute('role') === true)
20            img_childs.item(i).removeAttribute('role');
21    }
22    var unselected = ol.querySelectorAll('div[unselectable="on"]');
23    for(t = 0; t < unselected.length; t++){
24        if(unselected.item(t).hasAttribute('unselectable') === true)
25            unselected.item(t).removeAttribute('unselectable');
26    }
27    
28}
29
30var callback = function(mutationsList, observer) {
31    updateAlts();
32}
33
34function addALts(c){
35    updateAlts();
36    var config = { attributes: true, childList: true, subtree: true };
37    var observer = new MutationObserver(callback);
38    observer.observe(c, config);
39}
40
41function cleanOpenLayer(){
42    var ol = document.getElementById('openlayers-map');
43    var olv = document.getElementById('openlayers-views-map');
44    var olvc = document.getElementsByClassName('openlayers-views-map');
45    var vfgm = document.getElementsByClassName('views-field-field-google-map');
46    var frames = document.getElementsByTagName('iframe');
47    var calendars = document.getElementsByClassName('hasDatepicker');
48    if(ol || olv || olvc.length > 0 || vfgm.length > 0){
49        if(ol)
50            var c = ol;
51        else if(olv)
52            var c = olv;
53        else if(olvc.length > 0)
54            var c = olvc.item(0);
55        else if(vfgm. length > 0)
56            var c = vfgm.item(0);
57        addALts(c);
58    }
59    if(frames.length > 0){
60        for(i = 0; i < frames.length; i++){
61            frames.item(i).removeAttribute('frameborder');
62            frames.item(i).removeAttribute('webkitallowfullscreen');
63            frames.item(i).removeAttribute('mozallowfullscreen');
64            frames.item(i).setAttribute('title', 'open layers map');
65        }
66    }
67}
68
69
70function cleanGoogleTag(){
71    var googleTag = document.getElementsByClassName('region-page-top')[0];
72    if(googleTag){
73        var noScript = googleTag.getElementsByTagName('noscript')[0];
74        noScript.removeAttribute('aria-hidden');
75        noScript.innerHTML = noScript.innerHTML.replace('height="0" width="0"', '');
76    }
77}
78
79//Only one document load
80document.addEventListener("DOMContentLoaded", function(){
81    cleanOpenLayer();
82    cleanGoogleTag();
83});;
84;
85jQuery(function() { // onReady()
86  //jQuery('#edit-field-txnmy-microsite .form-select option:disabled').hide();
87  var txnmy_microsite;
88  var microsite;
89  txnmy_microsite = jQuery('#edit-field-txnmy-microsite .form-select option:disabled');
90  microsite = jQuery('#edit-field-microsite .form-select option:disabled');
91  if (typeof txnmy_microsite != 'undefined') {
92    txnmy_microsite.remove();
93  }
94  if (typeof microsite != 'undefined') {
95    microsite.remove();
96  }
97  
98} ); // end onReady()
99;
100/**
101 * @file
102 * Lazyloader JQuery plugin
103 *
104 * @author: Daniel Honrade http://drupal.org/user/351112
105 *
106 * Settings:
107 * - distance = distance of the image to the viewable browser screen before it gets loaded
108 * - icon     = animating image that appears before the actual image is loaded
109 *
110 */
111
112(function($){
113
114  // Window jQuery object global reference.
115  var $window;
116
117  // Process lazyloader
118  $.fn.lazyloader = function(options){
119    var settings = $.extend($.fn.lazyloader.defaults, options);
120    var images = this;
121
122    if (typeof($window) == 'undefined') {
123      $window = $(window);
124    }
125
126    // add the loader icon
127    if(settings['icon'] != '') $('img[data-src]').parent().css({ position: 'relative', display: 'block'}).prepend('<img class="lazyloader-icon" src="' + settings['icon'] + '" />');
128
129    // Load on refresh
130    loadActualImages(images, settings);
131
132    // Load on scroll
133    $window.bind('scroll', function(e) {
134      loadActualImages(images, settings);
135    });
136
137    // Load on resize
138    $window.resize(function(e) {
139      loadActualImages(images, settings);
140    });
141
142    return this;
143  };
144
145  // Defaults
146  $.fn.lazyloader.defaults = {
147    distance: 0, // the distance (in pixels) of image when loading of the actual image will happen
148    icon: ''    // display animating icon
149  };
150
151
152  // Loading actual images
153  function loadActualImages(images, settings){
154    clearTimeout($.fn.lazyloader.timeout);
155
156    $.fn.lazyloader.timeout = setTimeout(function(){
157      images.each(function(){
158        var $image = $(this);
159        var imageHeight = $image.height(), imageWidth = $image.width();
160        var iconTop = Math.round(imageHeight/2), iconLeft = Math.round(imageWidth/2), iconFactor = Math.round($image.siblings('img.lazyloader-icon').height()/2);
161        $image.siblings('img.lazyloader-icon').css({ top: iconTop - iconFactor, left: iconLeft - iconFactor });
162
163        if (windowView(this, settings) && ($image.attr('data-src'))) {
164          loadImage(this);
165          $image.fadeIn('slow');
166        }
167      });
168    }, 50);
169  };
170
171
172  // Check if the images are within the window view (top, bottom, left and right)
173  function windowView(image, settings){
174    var $image = $(image);
175    // window variables
176    var windowHeight = $window.height(),
177        windowWidth  = $window.width(),
178
179        windowBottom = windowHeight + $window.scrollTop(),
180        windowTop    = windowBottom - windowHeight,
181        windowRight  = windowWidth + $window.scrollLeft(),
182        windowLeft   = windowRight - windowWidth,
183
184        // image variables
185        imageHeight  = $image.height(),
186        imageWidth   = $image.width(),
187
188        imageTop     = $image.offset().top - settings['distance'],
189        imageBottom  = imageTop + imageHeight + settings['distance'],
190        imageLeft    = $image.offset().left - settings['distance'],
191        imageRight   = imageLeft + imageWidth + settings['distance'];
192
193           // This will return true if any corner of the image is within the screen
194    return (((windowBottom >= imageTop) && (windowTop <= imageTop)) || ((windowBottom >= imageBottom) && (windowTop <= imageBottom))) &&
195           (((windowRight >= imageLeft) && (windowLeft <= imageLeft)) || ((windowRight >= imageRight) && (windowLeft <= imageRight)));
196  };
197
198
199  // Load the image
200  function loadImage(image){
201    var $image = $(image);
202    $image.hide().attr('src', $image.data('src')).removeAttr('data-src');
203    $image.load(function() {
204      $image.siblings('img.lazyloader-icon').remove();
205    });
206  };
207
208})(jQuery);
209;
210(function ($) {
211
212Drupal.extlink = Drupal.extlink || {};
213
214Drupal.extlink.attach = function (context, settings) {
215  if (!settings.hasOwnProperty('extlink')) {
216    return;
217  }
218
219  // Strip the host name down, removing ports, subdomains, or www.
220  var pattern = /^(([^\/:]+?\.)*)([^\.:]{4,})((\.[a-z]{1,4})*)(:[0-9]{1,5})?$/;
221  var host = window.location.host.replace(pattern, '$3$4');
222  var subdomain = window.location.host.replace(pattern, '$1');
223
224  // Determine what subdomains are considered internal.
225  var subdomains;
226  if (settings.extlink.extSubdomains) {
227    subdomains = "([^/]*\\.)?";
228  }
229  else if (subdomain == 'www.' || subdomain == '') {
230    subdomains = "(www\\.)?";
231  }
232  else {
233    subdomains = subdomain.replace(".", "\\.");
234  }
235
236  // Build regular expressions that define an internal link.
237  var internal_link = new RegExp("^https?://" + subdomains + host, "i");
238
239  // Extra internal link matching.
240  var extInclude = false;
241  if (settings.extlink.extInclude) {
242    extInclude = new RegExp(settings.extlink.extInclude.replace(/\\/, '\\'), "i");
243  }
244
245  // Extra external link matching.
246  var extExclude = false;
247  if (settings.extlink.extExclude) {
248    extExclude = new RegExp(settings.extlink.extExclude.replace(/\\/, '\\'), "i");
249  }
250
251  // Extra external link CSS selector exclusion.
252  var extCssExclude = false;
253  if (settings.extlink.extCssExclude) {
254    extCssExclude = settings.extlink.extCssExclude;
255  }
256
257  // Extra external link CSS selector explicit.
258  var extCssExplicit = false;
259  if (settings.extlink.extCssExplicit) {
260    extCssExplicit = settings.extlink.extCssExplicit;
261  }
262
263  // Find all links which are NOT internal and begin with http as opposed
264  // to ftp://, javascript:, etc. other kinds of links.
265  // When operating on the 'this' variable, the host has been appended to
266  // all links by the browser, even local ones.
267  // In jQuery 1.1 and higher, we'd use a filter method here, but it is not
268  // available in jQuery 1.0 (Drupal 5 default).
269  var external_links = new Array();
270  var mailto_links = new Array();
271  $("a:not(." + settings.extlink.extClass + ", ." + settings.extlink.mailtoClass + "), area:not(." + settings.extlink.extClass + ", ." + settings.extlink.mailtoClass + ")", context).each(function(el) {
272    try {
273      var url = this.href.toLowerCase();
274      if (url.indexOf('http') == 0
275        && ((!url.match(internal_link) && !(extExclude && url.match(extExclude))) || (extInclude && url.match(extInclude)))
276        && !(extCssExclude && $(this).parents(extCssExclude).length > 0)
277        && !(extCssExplicit && $(this).parents(extCssExplicit).length < 1)) {
278        external_links.push(this);
279      }
280      // Do not include area tags with begin with mailto: (this prohibits
281      // icons from being added to image-maps).
282      else if (this.tagName != 'AREA' 
283        && url.indexOf('mailto:') == 0 
284        && !(extCssExclude && $(this).parents(extCssExclude).length > 0)
285        && !(extCssExplicit && $(this).parents(extCssExplicit).length < 1)) {
286        mailto_links.push(this);
287      }
288    }
289    // IE7 throws errors often when dealing with irregular links, such as:
290    // <a href="node/10"></a> Empty tags.
291    // <a href="http://user:[email protected]">example</a> User:pass syntax.
292    catch (error) {
293      return false;
294    }
295  });
296
297  if (settings.extlink.extClass) {
298    Drupal.extlink.applyClassAndSpan(external_links, settings.extlink.extClass);
299  }
300
301  if (settings.extlink.mailtoClass) {
302    Drupal.extlink.applyClassAndSpan(mailto_links, settings.extlink.mailtoClass);
303  }
304
305  if (settings.extlink.extTarget) {
306    // Apply the target attribute to all links.
307    $(external_links).attr('target', settings.extlink.extTarget);
308  }
309
310  Drupal.extlink = Drupal.extlink || {};
311
312  // Set up default click function for the external links popup. This should be
313  // overridden by modules wanting to alter the popup.
314  Drupal.extlink.popupClickHandler = Drupal.extlink.popupClickHandler || function() {
315    if (settings.extlink.extAlert) {
316      return confirm(settings.extlink.extAlertText);
317    }
318   }
319
320  $(external_links).click(function(e) {
321    return Drupal.extlink.popupClickHandler(e);
322  });
323};
324
325/**
326 * Apply a class and a trailing <span> to all links not containing images.
327 *
328 * @param links
329 *   An array of DOM elements representing the links.
330 * @param class_name
331 *   The class to apply to the links.
332 */
333Drupal.extlink.applyClassAndSpan = function (links, class_name) {
334  var $links_to_process;
335  if (Drupal.settings.extlink.extImgClass){
336    $links_to_process = $(links);
337  }
338  else {
339    var links_with_images = $(links).find('img').parents('a');
340    $links_to_process = $(links).not(links_with_images);
341  }
342  $links_to_process.addClass(class_name);
343  var i;
344  var length = $links_to_process.length;
345  for (i = 0; i < length; i++) {
346    var $link = $($links_to_process[i]);
347    if ($link.css('display') == 'inline' || $link.css('display') == 'inline-block') {
348      if (class_name == Drupal.settings.extlink.mailtoClass) {
349        $link.append('<span class="' + class_name + '"><span class="element-invisible"> ' + Drupal.settings.extlink.mailtoLabel + '</span></span>');
350      }
351      else {
352        $link.append('<span class="' + class_name + '"><span class="element-invisible"> ' + Drupal.settings.extlink.extLabel + '</span></span>');
353      }
354    }
355  }
356};
357
358Drupal.behaviors.extlink = Drupal.behaviors.extlink || {};
359Drupal.behaviors.extlink.attach = function (context, settings) {
360  // Backwards compatibility, for the benefit of modules overriding extlink
361  // functionality by defining an "extlinkAttach" global function.
362  if (typeof extlinkAttach === 'function') {
363    extlinkAttach(context);
364  }
365  else {
366    Drupal.extlink.attach(context, settings);
367  }
368};
369
370})(jQuery);
371;

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.