PageSourceSearch

https://www.mercerisland.gov/sites/default/files/js/js_daAmAaaah7ig3Cdtsm2h9ukFGrcHQ-KbCaM820swJYo.js

js mercerisland.gov collected 2026-10-02 07:34:56 UTC 9,708 bytes, 286 lines download raw bytes

1// ******************************************
2// onReady()
3// ******************************************
4jQuery(function() { // onReady()
5  var gcal,href;
6  gcal = jQuery('a.ical-icon').clone(true);
7
8  jQuery(gcal).addClass('gcal-icon');
9  href = 'http://www.google.com/calendar/render?cid=' + jQuery(gcal).attr('href');
10  jQuery(gcal).attr('href',href);
11
12  jQuery('a.ical-icon img').attr('src','/sites/all/modules/aha_google_ical/images/outlook.gif');
13  jQuery('a.ical-icon img').removeAttr('height');
14  jQuery('a.ical-icon img').removeAttr('width');
15  jQuery('a.ical-icon').after(gcal);
16  jQuery('a.gcal-icon img').attr('src','/sites/all/modules/aha_google_ical/images/google.gif');
17  jQuery('a.gcal-icon img').removeAttr('height');
18  jQuery('a.gcal-icon img').removeAttr('width');
19
20
21} ); // end onReady()
22// ******************************************
23// End onReady()
24// ******************************************
25;
26(function ($) {
27    
28Drupal.behaviors.jquerymenu = { 
29    attach:function(context) {    
30    
31    
32  jqm_showit = function() {
33    $(this).children('.jqm_link_edit').fadeIn();
34  }
35  jqm_hideit = function() {
36    $(this).children('.jqm_link_edit').fadeOut();
37  }
38  $('ul.jquerymenu li').hover(jqm_showit, jqm_hideit);
39  
40  jqm_mouseenter = function() {
41    momma = $(this);
42    if ($(momma).hasClass('closed')){
43      if (Drupal.settings.jquerymenu.animate === 1) {
44        $($(this).siblings('ul').children()).hide().fadeIn('3000');
45        $(momma).children('ul').slideDown('700');
46      }
47      $(momma).removeClass('closed').addClass('open');
48      $(this).removeClass('closed').addClass('open');
49    }    
50  }
51  
52  jqm_mouseleave = function(){
53    momma = $(this);
54    if ($(momma).hasClass('open')){
55      if (Drupal.settings.jquerymenu.animate === 1) {
56        $(momma).children('ul').slideUp('700');
57        $($(this).siblings('ul').children()).fadeOut('3000');
58      }
59      $(momma).removeClass('open').addClass('closed');
60      $(this).removeClass('open').addClass('closed');
61    }
62  }
63
64$('ul.jquerymenu .active').parents('li').removeClass('closed').addClass('open');
65$('ul.jquerymenu .active').parents('li').children('span.parent').removeClass('closed').addClass('open');
66
67  if (Drupal.settings.jquerymenu.hover === 1) {
68    $('ul.jquerymenu:not(.jquerymenu-processed)', context).addClass('jquerymenu-processed').each(function(){
69      $(this).find('li.parent').hover(jqm_mouseenter, jqm_mouseleave);
70    });
71    $('ul.jquerymenu-processed span.parent').remove();
72  }
73
74  else if (Drupal.settings.jquerymenu.hover === 0) {
75    $('ul.jquerymenu:not(.jquerymenu-processed)', context).addClass('jquerymenu-processed').each(function(){
76      $(this).find("li.parent span.parent").click(function(){
77        momma = $(this).parent();
78        if ($(momma).hasClass('closed')){
79          if (Drupal.settings.jquerymenu.animate === 1) {
80            $($(this).siblings('ul').children()).hide().fadeIn('3000');
81            $(momma).children('ul').slideDown('700');
82          }
83          $(momma).removeClass('closed').addClass('open');
84          $(this).removeClass('closed').addClass('open');
85        }
86        else{
87          if (Drupal.settings.jquerymenu.animate === 1) {          
88            $(momma).children('ul').slideUp('700');
89            $($(this).siblings('ul').children()).fadeOut('3000');
90          }
91          $(momma).removeClass('open').addClass('closed');
92          $(this).removeClass('open').addClass('closed');
93        }
94      });
95    });
96  }
97}
98}})(jQuery);;
99(function ($) {
100
101Drupal.googleanalytics = {};
102
103$(document).ready(function() {
104
105  // Attach mousedown, keyup, touchstart events to document only and catch
106  // clicks on all elements.
107  $(document.body).bind("mousedown keyup touchstart", function(event) {
108
109    // Catch the closest surrounding link of a clicked element.
110    $(event.target).closest("a,area").each(function() {
111
112      // Is the clicked URL internal?
113      if (Drupal.googleanalytics.isInternal(this.href)) {
114        // Skip 'click' tracking, if custom tracking events are bound.
115        if ($(this).is('.colorbox') && (Drupal.settings.googleanalytics.trackColorbox)) {
116          // Do nothing here. The custom event will handle all tracking.
117          //console.info("Click on .colorbox item has been detected.");
118        }
119        // Is download tracking activated and the file extension configured for download tracking?
120        else if (Drupal.settings.googleanalytics.trackDownload && Drupal.googleanalytics.isDownload(this.href)) {
121          // Download link clicked.
122          gtag('event', Drupal.googleanalytics.getDownloadExtension(this.href).toUpperCase(), {
123            event_category: 'Downloads',
124            event_label: Drupal.googleanalytics.getPageUrl(this.href),
125            transport_type: 'beacon'
126          });
127        }
128        else if (Drupal.googleanalytics.isInternalSpecial(this.href)) {
129          // Keep the internal URL for Google Analytics website overlay intact.
130          // @todo: May require tracking ID
131          gtag('config', drupalSettings.google_analytics.account, {
132            page_path: Drupal.googleanalytics.getPageUrl(this.href),
133            transport_type: 'beacon'
134          });
135        }
136      }
137      else {
138        if (Drupal.settings.googleanalytics.trackMailto && $(this).is("a[href^='mailto:'],area[href^='mailto:']")) {
139          // Mailto link clicked.
140          gtag('event', 'Click', {
141            event_category: 'Mails',
142            event_label: this.href.substring(7),
143            transport_type: 'beacon'
144          });
145        }
146        else if (Drupal.settings.googleanalytics.trackOutbound && this.href.match(/^\w+:\/\//i)) {
147          if (Drupal.settings.googleanalytics.trackDomainMode !== 2 || (Drupal.settings.googleanalytics.trackDomainMode === 2 && !Drupal.googleanalytics.isCrossDomain(this.hostname, Drupal.settings.googleanalytics.trackCrossDomains))) {
148            // External link clicked / No top-level cross domain clicked.
149            gtag('event', 'Click', {
150              event_category: 'Outbound links',
151              event_label: this.href,
152              transport_type: 'beacon'
153            });
154          }
155        }
156      }
157    });
158  });
159
160  // Track hash changes as unique pageviews, if this option has been enabled.
161  if (Drupal.settings.googleanalytics.trackUrlFragments) {
162    window.onhashchange = function() {
163      gtag('config', drupalSettings.google_analytics.account, {
164        page_path: location.pathname + location.search + location.hash
165      });
166    };
167  }
168
169  // Colorbox: This event triggers when the transition has completed and the
170  // newly loaded content has been revealed.
171  if (Drupal.settings.googleanalytics.trackColorbox) {
172    $(document).bind("cbox_complete", function () {
173      var href = $.colorbox.element().attr("href");
174      if (href) {
175        gtag('config', drupalSettings.google_analytics.account, {
176          page_path: Drupal.googleanalytics.getPageUrl(href)
177        });
178      }
179    });
180  }
181
182});
183
184/**
185 * Check whether the hostname is part of the cross domains or not.
186 *
187 * @param string hostname
188 *   The hostname of the clicked URL.
189 * @param array crossDomains
190 *   All cross domain hostnames as JS array.
191 *
192 * @return boolean
193 */
194Drupal.googleanalytics.isCrossDomain = function (hostname, crossDomains) {
195  /**
196   * jQuery < 1.6.3 bug: $.inArray crushes IE6 and Chrome if second argument is
197   * `null` or `undefined`, https://bugs.jquery.com/ticket/10076,
198   * https://github.com/jquery/jquery/commit/a839af034db2bd934e4d4fa6758a3fed8de74174
199   *
200   * @todo: Remove/Refactor in D8
201   */
202  if (!crossDomains) {
203    return false;
204  }
205  else {
206    return $.inArray(hostname, crossDomains) > -1 ? true : false;
207  }
208};
209
210/**
211 * Check whether this is a download URL or not.
212 *
213 * @param string url
214 *   The web url to check.
215 *
216 * @return boolean
217 */
218Drupal.googleanalytics.isDownload = function (url) {
219  var isDownload = new RegExp("\\.(" + Drupal.settings.googleanalytics.trackDownloadExtensions + ")([\?#].*)?$", "i");
220  return isDownload.test(url);
221};
222
223/**
224 * Check whether this is an absolute internal URL or not.
225 *
226 * @param string url
227 *   The web url to check.
228 *
229 * @return boolean
230 */
231Drupal.googleanalytics.isInternal = function (url) {
232  var isInternal = new RegExp("^(https?):\/\/" + window.location.host, "i");
233  return isInternal.test(url);
234};
235
236/**
237 * Check whether this is a special URL or not.
238 *
239 * URL types:
240 *  - gotwo.module /go/* links.
241 *
242 * @param string url
243 *   The web url to check.
244 *
245 * @return boolean
246 */
247Drupal.googleanalytics.isInternalSpecial = function (url) {
248  var isInternalSpecial = new RegExp("(\/go\/.*)$", "i");
249  return isInternalSpecial.test(url);
250};
251
252/**
253 * Extract the relative internal URL from an absolute internal URL.
254 *
255 * Examples:
256 * - https://mydomain.com/node/1 -> /node/1
257 * - https://example.com/foo/bar -> https://example.com/foo/bar
258 *
259 * @param string url
260 *   The web url to check.
261 *
262 * @return string
263 *   Internal website URL
264 */
265Drupal.googleanalytics.getPageUrl = function (url) {
266  var extractInternalUrl = new RegExp("^(https?):\/\/" + window.location.host, "i");
267  return url.replace(extractInternalUrl, '');
268};
269
270/**
271 * Extract the download file extension from the URL.
272 *
273 * @param string url
274 *   The web url to check.
275 *
276 * @return string
277 *   The file extension of the passed url. e.g. "zip", "txt"
278 */
279Drupal.googleanalytics.getDownloadExtension = function (url) {
280  var extractDownloadextension = new RegExp("\\.(" + Drupal.settings.googleanalytics.trackDownloadExtensions + ")([\?#].*)?$", "i");
281  var extension = extractDownloadextension.exec(url);
282  return (extension === null) ? '' : extension[1];
283};
284
285})(jQuery);
286;

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.