Skip to content

Instantly share code, notes, and snippets.

@kruton
Created September 4, 2020 02:05
Show Gist options
  • Save kruton/e51cf6dc443a9ba00672aa5761efa992 to your computer and use it in GitHub Desktop.
Save kruton/e51cf6dc443a9ba00672aa5761efa992 to your computer and use it in GitHub Desktop.
// ==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