Last active
October 30, 2020 17:53
-
-
Save Algomorph/df8bae322a0e1abb71f0028b30f799b4 to your computer and use it in GitHub Desktop.
This is a script for Tab Reloader for issuing a sound notification when a student enters the regrade request queue up on grades.cs.umd.edu (TA view)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(window.location.href.includes("https://grades.cs.umd.edu/classWeb/processRegrade.cgi?courseID=")){ | |
main_cell = document.body.children[0].children[0]; | |
header_cell = main_cell.children[2]; | |
title_cell = header_cell.children[1]; | |
title_3 = title_cell.children[1].children[0].children[0].innerText; | |
if(title_3 === "Pending & In-Process Re-grade Requests"){ | |
data_cell = main_cell.children[3].children[0]; | |
if(data_cell.children[0].children[0].childElementCount > 0){ | |
regrade_request_table = data_cell.children[0].children[0]; | |
if(regrade_request_table.children[0].childElementCount > 1){ | |
first_row = regrade_request_table.children[0].children[1]; | |
status = first_row.children[3].innerText; | |
if(status === "Pending"){ | |
let audio = new Audio('http://codeskulptor-demos.commondatastorage.googleapis.com/descent/gotitem.mp3'); | |
audio.play(); | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment