From 31b6a49e091b3465603bb393bc2116459a0fe8ae Mon Sep 17 00:00:00 2001 From: Ben Scholer Date: Mon, 21 Jan 2019 13:38:10 -0500 Subject: [PATCH] Fixed a merge issue --- content.js | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/content.js b/content.js index 4fc51e8..46fe01a 100644 --- a/content.js +++ b/content.js @@ -7,9 +7,10 @@ //Click on the "Purdue Account Login" button if (window.location.href.startsWith("https://mycourses.purdue.edu/webapps/login/") === true - && document.getElementsByClassName("purdue-btn-bottom-row")[0] != null) { + && document.getElementsByClassName("purdue-btn-bottom-row")[0] !== null) { document.getElementsByClassName("purdue-btn-bottom-row")[0].click(); } + //Make sure we're on Purdue's CAS, otherwise, don't do anything. if (window.location.href.startsWith("https://www.purdue.edu/apps/account/cas/login") === true) { let url = new URL(window.location.href); @@ -23,6 +24,7 @@ if (window.location.href.startsWith("https://www.purdue.edu/apps/account/cas/log localStorage.removeItem("counter"); window.close(); } +} //Make sure we're on Purdue's CAS, otherwise, don't do anything. if (window.location.href.startsWith("https://www.purdue.edu/apps/account/cas/login") === true) { @@ -189,12 +191,3 @@ function get(key) { function set(key, value) { localStorage.setItem(key, value); } - -function sleep(milliseconds) { - var start = new Date().getTime(); - for (var i = 0; i < 1e7; i++) { - if ((new Date().getTime() - start) > milliseconds) { - break; - } - } -} \ No newline at end of file