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 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'crsq.js') 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 -- cgit v1.2.3-54-g00ecf