blackboardfix

blackboardfix Git Source Tree


Root/blackboardfix.user.js

// ==UserScript==
// @name         Blackboard fix
// @namespace    https://srchub.org
// @version      0.8
// @description  Fixes the grade center to actually be usable
// @author       Nathan Adams <nathan@allostech.com>
// @match        https://lewisuniversity.blackboard.com/*
// @updateURL    https://srchub.org/p/blackboardfix/source/file/master/blackboardfix.user.js
// @downloadURL  https://srchub.org/p/blackboardfix/source/file/master/blackboardfix.user.js
// @grant        none
// ==/UserScript==
// License: MIT
//


// This fixes the horriable "boxing" in the grade center
var style=document.createElement('style');
style.type='text/css';
var cssStyle = '.gbtable tbody tr td, .gbtable tbody tr th, .gbtable_header th, .gbtable thead th { padding: 0px !important; height: 0px !important; }';
if(style.styleSheet){
    style.styleSheet.cssText=cssStyle;
}else{
    style.appendChild(document.createTextNode(cssStyle));
}
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", "800px");
        jQuery("#table1_container > div").css("top", "800px");
    }, 1000);

}
//

if (window.location.href.includes("assessment/do/gradeTest")) {
    jQuery(document).keydown(function (e) {
        if (e.which == 66) { // b
            jQuery("input[id^=points]").first().focus();
            e.preventDefault();
        }
        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();
        }
    });
}

Archive Download this file

Branches

Number of commits:
Page rendered in 0.05212s using 11 queries.