From c2ce71ea1faa08dc2b5f0843003fab399b9f267b Mon Sep 17 00:00:00 2001 From: "Alex Xu (Hello71)" Date: Tue, 18 Sep 2018 16:21:40 -0400 Subject: pacify AMO --- crsq.js | 11 +++++++---- yorku-course-query | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/crsq.js b/crsq.js index 3fb7ea5..289a739 100644 --- a/crsq.js +++ b/crsq.js @@ -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) ? - '


All About Passport York

' : - '
New Student?
All about Passport York
'; + // 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 = '


All About Passport York

'; + } else { + s.innerHTML = '
New Student?
All about Passport York
'; + } var avs = xhr .responseXML diff --git a/yorku-course-query b/yorku-course-query index 6d1016e..87c3ae2 160000 --- a/yorku-course-query +++ b/yorku-course-query @@ -1 +1 @@ -Subproject commit 6d1016e2dfb3d0b10d8e7203dd217382821ab42a +Subproject commit 87c3ae27d68cdecb967d91a56146dc7874867a8b -- cgit v1.2.3-70-g09d2