PageSourceSearch

https://www.toronto.ca/cot/jquery-additional-custom-js.js

js toronto.ca collected 2026-09-24 07:01:57 UTC 1,432 bytes, 46 lines download raw bytes

1// ------------------------ Fix for COTUI -----------------------------
2var COTUI = function(){};
3// ------------------------ Fix for COTUI -----------------------------
4
5// ------------------------ Fix for selector -----------------------------
6(function() {
7	
8	if ($.fn.jquery == '3.3.1' || $.fn.jquery == '3.6.0') {
9
10		var oldInit = jQuery.fn.init;
11
12		jQuery.fn.init = function(arg1) {
13			var args = Array.prototype.slice.call(arguments);
14			if (typeof arg1 === "string" && arg1 === "#") {
15				args[0] = [];
16			}
17
18			var obj = oldInit.apply(this, args);
19			obj.selector = arg1;
20			return obj;
21		};
22
23		jQuery.fn.init.prototype = jQuery.fn;
24	}
25
26})();
27// -----------------------------------------------------------------------------------------
28
29
30
31// Fix Accordion Bug - remove after v1.2.7
32//function getUrlParameter(name) {
33//  name = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
34//  var regex = new RegExp('[\\?&]' + name + '=([^&#]*)');
35//  var results = regex.exec( location.search );
36//  results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
37//  return results;
38//};
39//var accordion = getUrlParameter( 'accordion' );
40//if ( accordion ) {
41//    var slug = 'accordion-' + accordion[1];
42//    var accid = document.getElementById( slug );
43//    if(accid == null ) {
44//	location.search = location.search.replace('accordion='+accordion[1], '');
45//    }
46//}

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.