diff options
author | Alex Xu (Hello71) <alex_y_xu@yahoo.ca> | 2018-09-18 16:21:40 -0400 |
---|---|---|
committer | Alex Xu (Hello71) <alex_y_xu@yahoo.ca> | 2018-09-18 16:21:40 -0400 |
commit | c2ce71ea1faa08dc2b5f0843003fab399b9f267b (patch) | |
tree | 95d8aba19105bc8683be251f7cb7601dbe369a24 | |
parent | 0d046223e2b2478473bef39e053d3021fbe169b0 (diff) | |
download | yorku-web-helper-c2ce71ea1faa08dc2b5f0843003fab399b9f267b.tar.xz yorku-web-helper-c2ce71ea1faa08dc2b5f0843003fab399b9f267b.zip |
pacify AMO
-rw-r--r-- | crsq.js | 11 | ||||
m--------- | yorku-course-query | 0 |
2 files changed, 7 insertions, 4 deletions
@@ -32,10 +32,13 @@ xhr.onreadystatechange = function () { xhr.responseXML.title === "York University Courses Website - Courses Schedule" ) { // emulate document.write script - xhr.responseXML.body.querySelector("script").parentNode.innerHTML = - /(?:mayaauth|mayaanyoneauth)/.test(document.cookie) ? - '<TABLE width="200" cellpadding="5" cellspacing="0" border="0"><TR><TD><P><a href="https://passportyork.yorku.ca/ppylogin/ppylogout"><IMG src="https://w2prod.sis.yorku.ca/WebObjects/YorkUimages/logout.gif" width="154" height="45" border="0"></a><BR><SPAN class="smallbodytext"><A href="http://www.yorku.ca/yorkweb/currentstudents/ppystudents.html">All About Passport York</A></SPAN></P></TD></TR></TABLE>' : - '<TABLE border="0"><TR><TD><img src="https://w2prod.sis.yorku.ca/WebObjects/YorkUimages/passportyorksmall2.gif" width="73" height="42"></TD><TD><B>New Student?</B><BR><a href="http://www.yorku.ca/yorkweb/currentstudents/ppystudents.html">All about Passport York</a></TD></TR></TABLE>'; + // 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 = '<TABLE width="200" cellpadding="5" cellspacing="0" border="0"><TR><TD><P><a href="https://passportyork.yorku.ca/ppylogin/ppylogout"><IMG src="https://w2prod.sis.yorku.ca/WebObjects/YorkUimages/logout.gif" width="154" height="45" border="0"></a><BR><SPAN class="smallbodytext"><A href="http://www.yorku.ca/yorkweb/currentstudents/ppystudents.html">All About Passport York</A></SPAN></P></TD></TR></TABLE>'; + } else { + s.innerHTML = '<TABLE border="0"><TR><TD><img src="https://w2prod.sis.yorku.ca/WebObjects/YorkUimages/passportyorksmall2.gif" width="73" height="42"></TD><TD><B>New Student?</B><BR><a href="http://www.yorku.ca/yorkweb/currentstudents/ppystudents.html">All about Passport York</a></TD></TR></TABLE>'; + } var avs = xhr .responseXML diff --git a/yorku-course-query b/yorku-course-query -Subproject 6d1016e2dfb3d0b10d8e7203dd217382821ab42 +Subproject 87c3ae27d68cdecb967d91a56146dc7874867a8 |