Here's a little JS hack I just cobbled together, in case you don't want to hide the entire block that lets them change card colors as well. Throwing it up here in hopes that it will help, and others will improve it.
function disableNicknames() {
// need to delay this function from being called because the page takes time to load
// 400 ms seems to be the shortest length that works reliably
setTimeout(function() {
// get the full list of buttons from course cards
let moreButtons = document.getElementsByClassName('ic-DashboardCard__header-button');
console.log(moreButtons);
let nnLabel; // to be used later
let clicks = 0; // This will stop errors from being reported when a user clicks the more button a second time.
// loop through each button on the page
for (i = 0; i < moreButtons.length; i++) {
// when the user clicks on a ... button
moreButtons[i].onclick = function() {
clicks++;
// if the number of clicks is odd, run the function
if (clicks % 2 == 1)
{
// again, need to set a timeout. The nickname label & box will be visible for 200 ms
// but it isn't too likely that they will be able to do anything with it.
setTimeout(function() {
nnLabel = document.getElementsByClassName('fCrpb_bGBk fCrpb_egrg');
nnLabel[0].style.display = 'none'; // hide the label
document.getElementById('NicknameInput').style.display = 'none'; // hide the input box
}, 200);
}
}
}
}, 400);
}
This discussion post is outdated and has been archived. Please use the Community question forums and official documentation for the most current and accurate information.