Skip to content

Instantly share code, notes, and snippets.

@elliotwesoff
Created June 8, 2021 04:41
Show Gist options
  • Save elliotwesoff/20e37d1a58e922d7e936b749d4df9452 to your computer and use it in GitHub Desktop.
Save elliotwesoff/20e37d1a58e922d7e936b749d4df9452 to your computer and use it in GitHub Desktop.
Hide WebAssign responses and answer keys
// copy and paste this function and call into your browser's dev tools console.
// use hideAnswers(false) to show the responses and answer keys again after initially hiding them.
function hideAnswers(hide) {
const selectors = '.static, .mq-root-block, input, div.solutionContainer, span.seenKey, img[alt*=answer], img[alt*=infinity], img[alt*="-infinity"], img[src*=symimage]';
document.getElements(selectors).forEach(e => e.style.display = hide ? 'none' : 'inherit');
}
hideAnswers(true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment