Skip to content

Commit

Permalink
Fixed a merge issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Scholer committed Jan 21, 2019
1 parent 41e3c25 commit 31b6a49
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions content.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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) {
Expand Down Expand Up @@ -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;
}
}
}

0 comments on commit 31b6a49

Please sign in to comment.