function toggleHTMLClassVisibility(className) {
var x = document.getElementsByClassName(className);
var i;
var display_style = "block"; // default
for (i = 0; i < x.length; i++) {
if (x[i].style.display === "none") {
display_style = "block";
} else {
display_style = "none";
}
x[i].style.display = display_style;
}
document.cookie=""+className+"_display_style"+"="+display_style;
};
function setHTMLClassVisibility(className, display_style) {
// use "block" or "none" for display_style
if (display_style === "") {
display_style = "block"; // default
}
var x = document.getElementsByClassName(className);
var i;
for (i = 0; i < x.length; i++) {
x[i].style.display = display_style;
}
document.cookie=""+className+"_display_style"+"="+display_style;
};
function toggleHistogramMarker() {
toggleHTMLClassVisibility("histogram_marker");
};
function toggleGradingScheme() {
toggleHTMLClassVisibility("grading_scheme");
};
// getCookie is copied from https://www.w3schools.com/js/js_cookies.asp
function getCookie(cname) {
var name = cname + "=";
var decodedCookie = decodeURIComponent(document.cookie);
var ca = decodedCookie.split(';');
for(var i = 0; i