Created
September 4, 2020 02:05
-
-
Save kruton/e51cf6dc443a9ba00672aa5761efa992 to your computer and use it in GitHub Desktop.
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
// ==UserScript== | |
// @name Canvas Assignment Highlighter | |
// @namespace https://the-b.org/ | |
// @version 0.1 | |
// @description Highlight unsubmitted assignments on Canvas. | |
// @author Kenny Root | |
// @match https://*.instructure.com/courses/*/assignments | |
// @grant GM_log | |
// @require https://code.jquery.com/jquery-latest.js | |
// ==/UserScript== | |
var printAssignments = function() { | |
$(".assignment-list").each(function() { | |
$(this).find(".assignment").each(function() { | |
var unsubmitted = false; | |
$(this).find(".score-display").each(function() { | |
if (~$(this).prop("title").indexOf("No Submission")) { | |
unsubmitted = true; | |
} | |
}); | |
if (unsubmitted) { | |
$(this).find(".ig-row").each(function() { | |
$(this).css("background-color", "#fcc"); | |
}); | |
} | |
}); | |
}); | |
} | |
$(document).ready(function() { | |
'use strict'; | |
setInterval(printAssignments, 1000); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment