diff --git a/blackboardfix.user.js b/blackboardfix.user.js index bc917f1..3282b8c 100644 --- a/blackboardfix.user.js +++ b/blackboardfix.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Blackboard fix // @namespace https://srchub.org -// @version 0.6 +// @version 0.7 // @description Fixes the grade center to actually be usable // @author Nathan Adams // @match https://lewisuniversity.blackboard.com/* @@ -25,12 +25,41 @@ if(style.styleSheet){ document.getElementsByTagName('head')[0].appendChild(style); // end fix + + // This will display all students rather than the default of 10 if (window.location.href.includes("gradebook/do/instructor/enterGradeCenter")) { + jQuery(document).ready(function () { jQuery("#openRowEditing")[0].click(); jQuery("#numRows").val("50"); jQuery("#submitRowEditing")[0].click(); }); + setTimeout(function () { + jQuery("#table1").css("height", "600px"); + jQuery("#table1_viewport").css("height", "614px"); + jQuery("#table1_container > div").css("top", "615px"); + }, 1000); + } -// \ No newline at end of file +// + +if (window.location.href.includes("assessment/do/gradeTest")) { + jQuery(document).keydown(function (e) { + if (e.which == 78) { // n + var ide = jQuery(":focus").attr("id").replace("points_", ""); + jQuery("#" + ide).next().find("input[id^=points__]").focus(); + e.preventDefault(); + } + + if (e.which == 190) { // . + jQuery("#bottom_saveAndNextButton").click(); + e.preventDefault(); + } + + if (e.which == 188) { // , + jQuery("#bottom_saveAndExitButton").click(); + e.preventDefault(); + } + }); +} \ No newline at end of file