From 87c3ae27d68cdecb967d91a56146dc7874867a8b Mon Sep 17 00:00:00 2001 From: "Alex Xu (Hello71)" Date: Tue, 18 Sep 2018 16:21:08 -0400 Subject: use textContent instead of innerHTML to pacify AMO --- script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script.js b/script.js index 83ed58e..494bfca 100644 --- a/script.js +++ b/script.js @@ -148,11 +148,11 @@ document.addEventListener("DOMContentLoaded", function () { if (state.fac && state.dept && state.crsn && state.cred && state.year && state.sess) { link.href = `https://w2prod.sis.yorku.ca/Apps/WebObjects/cdm.woa/wa/crsq?fa=${state.fac}&sj=${state.dept}&cn=${state.crsn}&cr=${state.cred}&ay=${state.year}&ss=${state.sess}`; - link.innerHTML = `York University: ${state.fac}/${state.dept} ${state.crsn} ${state.cred} (${sessions.selectedOptions[0].innerHTML})`; + link.textContent = `York University: ${state.fac}/${state.dept} ${state.crsn} ${state.cred} (${sessions.selectedOptions[0].textContent})`; linkContainer.style = "display: block"; } else if (state.fac && state.dept && state.sess) { link.href = `https://w2prod.sis.yorku.ca/Apps/WebObjects/cdm.woa/wa/crsq1?faculty=${state.fac}&subject=${state.dept}&academicyear=${state.year}&studysession=${state.sess}`; - link.innerHTML = `York University: ${state.fac}/${state.dept} Courses (${sessions.selectedOptions[0]. innerHTML})`; + link.textContent = `York University: ${state.fac}/${state.dept} Courses (${sessions.selectedOptions[0]. textContent})`; linkContainer.style = "display: block"; } else { linkContainer.style = "display: none"; -- cgit v1.2.3-54-g00ecf