Skip to content

Instantly share code, notes, and snippets.

@Algomorph
Last active October 30, 2020 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Algomorph/df8bae322a0e1abb71f0028b30f799b4 to your computer and use it in GitHub Desktop.
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)
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