(function () { "use strict"; var scheduleLink = document.evaluate('//a[contains(text(), " Schedule")]', document.body).iterateNext(); if (!scheduleLink) return; if (document.getElementById("loading-notice")) return; var loadingNotice = document.createElement("span"); loadingNotice.id = "loading-notice"; loadingNotice.innerHTML = " (loading, please wait)"; scheduleLink.parentNode.appendChild(loadingNotice); var xhr; // show the xhr in dev tools try { xhr = XPCNativeWrapper(new window.wrappedJSObject.XMLHttpRequest()); } catch (e) { xhr = new XMLHttpRequest(); } xhr.responseType = 'document'; xhr.open('GET', scheduleLink.href, true); xhr.onreadystatechange = function () { if (xhr.readyState !== xhr.DONE) return; if (xhr.status === 200 && xhr.responseXML && xhr.responseXML.title === "York University Courses Website - Courses Schedule" ) { // emulate document.write script // use if statement instead of conditional operator to pacify AMO auto reviewer var s = xhr.responseXML.body.querySelector("script").parentNode; if (/(?:mayaauth|mayaanyoneauth)=/.test(document.cookie)) { s.innerHTML = '
New Student? All about Passport York |