PageSourceSearch

https://www.mcgill.ca/admissions/sites/admissions/files/js/js_nZbI…zY7zYr_xb5bIPBmtA990biXgdgO777N2cg00fbXhQuA

js mcgill.ca collected 2026-09-24 07:16:04 UTC 10,241 bytes, 8 lines download raw bytes

1/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */
2(function($,Drupal,drupalSettings){'use strict';Drupal.google_analytics={};$(document).ready(function(){$(document.body).on('mousedown keyup touchstart',function(event){$(event.target).closest('a,area').each(function(){if(Drupal.google_analytics.isInternal(this.href))if($(this).is('.colorbox')&&(drupalSettings.google_analytics.trackColorbox)){}else if(drupalSettings.google_analytics.trackDownload&&Drupal.google_analytics.isDownload(this.href))gtag('event',Drupal.google_analytics.getDownloadExtension(this.href).toUpperCase(),{event_category:'Downloads',event_label:Drupal.google_analytics.getPageUrl(this.href),transport_type:'beacon'});else{if(Drupal.google_analytics.isInternalSpecial(this.href))gtag('config',drupalSettings.google_analytics.account,{page_path:Drupal.google_analytics.getPageUrl(this.href),transport_type:'beacon'});}else if(drupalSettings.google_analytics.trackMailto&&$(this).is("a[href^='mailto:'],area[href^='mailto:']"))gtag('event','Click',{event_category:'Mails',event_label:this.href.substring(7),transport_type:'beacon'});else if(drupalSettings.google_analytics.trackTel&&$(this).is("a[href^='tel:'],area[href^='tel:']"))gtag('event','Click',{event_category:'Telephone calls',event_label:this.href.substring(4),transport_type:'beacon'});else{if(drupalSettings.google_analytics.trackOutbound&&this.href.match(/^\w+:\/\//i))if(drupalSettings.google_analytics.trackDomainMode!==2||(drupalSettings.google_analytics.trackDomainMode===2&&!Drupal.google_analytics.isCrossDomain(this.hostname,drupalSettings.google_analytics.trackCrossDomains)))gtag('event','Click',{event_category:'Outbound links',event_label:this.href,transport_type:'beacon'});}});});if(drupalSettings.google_analytics.trackUrlFragments)window.onhashchange=function(){gtag('config',drupalSettings.google_analytics.account,{page_path:location.pathname+location.search+location.hash});};if(drupalSettings.google_analytics.trackColorbox)$(document).on('cbox_complete',function(){var href=$.colorbox.element().attr('href');if(href)gtag('config',drupalSettings.google_analytics.account,{page_path:Drupal.google_analytics.getPageUrl(href)});});});Drupal.google_analytics.isCrossDomain=function(hostname,crossDomains){return $.inArray(hostname,crossDomains)>-1?true:false;};Drupal.google_analytics.isDownload=function(url){var isDownload=new RegExp('\\.('+drupalSettings.google_analytics.trackDownloadExtensions+')([\?#].*)?$','i');return isDownload.test(url);};Drupal.google_analytics.isInternal=function(url){var isInternal=new RegExp('^(https?):\/\/'+window.location.host,'i');return isInternal.test(url);};Drupal.google_analytics.isInternalSpecial=function(url){var isInternalSpecial=new RegExp('(\/go\/.*)$','i');return isInternalSpecial.test(url);};Drupal.google_analytics.getPageUrl=function(url){var extractInternalUrl=new RegExp('^(https?):\/\/'+window.location.host,'i');return url.replace(extractInternalUrl,'');};Drupal.google_analytics.getDownloadExtension=function(url){var extractDownloadextension=new RegExp('\\.('+drupalSettings.google_analytics.trackDownloadExtensions+')([\?#].*)?$','i');var extension=extractDownloadextension.exec(url);return (extension===null)?'':extension[1];};})(jQuery,Drupal,drupalSettings);;
3/* @license MIT https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html */
4(function($,Drupal,once){Drupal.behaviors.superfish={attach(context,drupalSettings){$.each(drupalSettings.superfish||{},function(index,options){$(once('superfish',`ul#${options.id}`,context)).each(function(){const $menu=$(this);if(options.plugins)if(options.plugins.supersubs)$menu.supersubs(options.plugins.supersubs);$menu.superfish(options.sf);if(options.plugins){if(options.plugins.touchscreen)$menu.sftouchscreen(options.plugins.touchscreen);if(options.plugins.smallscreen)$menu.sfsmallscreen(options.plugins.smallscreen);if(options.plugins.supposition)$menu.supposition();}});});}};})(jQuery,Drupal,once);;
5/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */
6(function miles($,Drupal){Drupal.behaviors.table={attach(context,settings){Array.prototype.forEach.call(document.getElementsByClassName("tablesorter"),(el)=>{const tablesortInstance=new Tablesort(el);});}};})(jQuery,Drupal);;
7(function milesLegacy($,Drupal){Drupal.behaviors.accordion={attach(){const headers=$(".accordion--legacy > :header");const contents=$(".accordion--legacy > div");contents.hide();for(let i=0;i<headers.length;i++)headers[i].addEventListener("click",()=>{headers[i].classList.toggle("active");contents[i].style.display=contents[i].style.display==="block"?"none":"block";});}};Drupal.behaviors.tabs={attach(){const tabParent=$("div.tabs--legacy");const arrayContent=[];const tabLinks=$("div.tabs--legacy ul.tab-nav--legacy li > a");const tabReady=tabLinks;const tabContent=tabParent.find(">div");if(tabReady.length){tabParent.each(function tabCheck(index){const links=$(this).find("ul li > a");const tabContent=$(this).find(">div");$(this).addClass(`tab-parent-${index}`);$.merge(arrayContent,tabContent);const $active=$(links.filter(`[href="${window.location.hash}"]`)[0]||links[0]);$active.addClass("selected");const $activeIndex=links.index($active);tabContent.eq($activeIndex).show().siblings("div").hide();});tabLinks.click(function tabAction(e){const {target}=e;const activeIndex=tabLinks.index(target);const $targetContainer=$(arrayContent[activeIndex]);$targetContainer.show();$targetContainer.siblings(".container").hide();$(e.target).parent("li").siblings("li").children("a").removeClass("selected");$(this).addClass("selected");e.preventDefault();});
7tabContent.each(function tabIndex(index){index++;$(this).attr("id",`tab-${$(this).index()}`);$(this).addClass(`container tab-set-${$(this).index()}`);});}}};Drupal.behaviors.pullQuote={attach(){$("em.pull-quote--legacy").each(function pullQuote(){const $parentParagraph=$(this).parent("p");$parentParagraph.css("position","relative");const $clonedCopy=$(this).clone();$clonedCopy.addClass("mds-text-quote--pulled").prependTo($parentParagraph);const clonedText=$clonedCopy.text();$clonedCopy.html(clonedText);});}};})(jQuery,Drupal);;
8(function milesMenuDisclosure($,Drupal){function closeAll($menu){$menu.find("> li.menuparent").each(function(){const $li=$(this);const $btn=$li.children("button.miles-menu-toggle");if($btn.attr("aria-expanded")==="true"){$btn.attr("aria-expanded","false");$li.hideSuperfishUl();}});}function openDropdown($li,$btn,$menu){closeAll($menu);$btn.attr("aria-expanded","true");$li.showSuperfishUl();}function closeDropdown($li,$btn){$btn.attr("aria-expanded","false");$li.hideSuperfishUl();}function moveFocus(items,idx,delta){const next=idx+delta;if(next>=0&&next<items.length)items[next].focus();}function focusFirst(items){if(items.length)items[0].focus();}function focusLast(items){if(items.length)items[items.length-1].focus();}function getTopLevelItems($menu){return $menu.children("li").children("a, button.miles-menu-toggle").toArray();}function getTopLevelIndex(items,target){const idx=items.indexOf(target);return idx===-1?null:idx;}function getDropdownLinks($li){return $li.find("ul:visible a:visible").toArray();}function handleTopLevelKey(e,$target,$menu){const items=getTopLevelItems($menu);const idx=getTopLevelIndex(items,e.target);if(idx===null)return false;const actions={ArrowLeft:()=>{closeAll($menu);moveFocus(items,idx,-1);return true;},ArrowRight:()=>{closeAll($menu);moveFocus(items,idx,+1);return true;},ArrowDown:()=>{if(!$target.is("button.miles-menu-toggle"))return false;const $li=$target.closest("li");if($target.attr("aria-expanded")!=="true")openDropdown($li,$target,$menu);focusFirst(getDropdownLinks($li));return true;}};const action=actions[e.key];if(!action)return false;const handled=action();if(handled)e.preventDefault();return handled;}function handleDropdownKey(e,$menu){const $openLi=$menu.children("li.menuparent").has(e.target);if(!$openLi.length)return false;const $btn=$openLi.children("button.miles-menu-toggle");if($btn.attr("aria-expanded")!=="true")return false;const links=getDropdownLinks($openLi);const idx=links.indexOf(e.target);if(idx===-1)return false;const actions={ArrowDown:()=>moveFocus(links,idx,+1),ArrowUp:()=>moveFocus(links,idx,-1)};const action=actions[e.key];if(!action)return false;e.preventDefault();action();return true;}Drupal.behaviors.milesMenuDisclosure={attach(context){const $menu=$(context).find("ul#superfish-main").addBack("ul#superfish-main");if(!$menu.length||$menu.data("miles-disclosure-init"))return;$menu.data("miles-disclosure-init",true);$menu.find("> li.menuparent").each(function(){$(this).off("mouseenter mouseleave .hoverIntent");});const sfSerial=$menu[0]&&$menu[0].serial;if(sfSerial!==undefined&&$.fn.superfish.optionsList&&$.fn.superfish.optionsList[sfSerial]){$.fn.superfish.optionsList[sfSerial].delay=0;$.fn.superfish.optionsList[sfSerial].onBeforeShow=function(){};}$menu.on("click.miles-disclosure","> li.menuparent > button.miles-menu-toggle",function(e){e.stopPropagation();const $btn=$(this);const $li=$btn.closest("li");const isExpanded=$btn.attr("aria-expanded")==="true";if(isExpanded)closeDropdown($li,$btn);else openDropdown($li,$btn,$menu);});$(document).on("keydown.miles-disclosure",function(e){if(e.key!=="Escape")return;const $openLi=$menu.find("> li.menuparent").filter(function(){return ($(this).children("button.miles-menu-toggle").attr("aria-expanded")==="true");});if($openLi.length){const $btn=$openLi.children("button.miles-menu-toggle");closeDropdown($openLi,$btn);$btn.trigger("focus");}});$(document).on("click.miles-disclosure",function(e){if(!$(e.target).closest($menu).length)closeAll($menu);});$menu.on("keydown.miles-disclosure",function(e){const $target=$(e.target);const isTopLevel=$target.parent().parent().is($menu);
8if(isTopLevel)handleTopLevelKey(e,$target,$menu);else handleDropdownKey(e,$menu);});},detach(context,settings,trigger){if(trigger!=="unload")return;const $menu=$(context).find("ul#superfish-main").addBack("ul#superfish-main");if($menu.data("miles-disclosure-init")){$menu.removeData("miles-disclosure-init");$menu.off(".miles-disclosure");$(document).off("keydown.miles-disclosure click.miles-disclosure");}}};})(jQuery,Drupal);;

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.