Created
June 8, 2021 04:41
-
-
Save elliotwesoff/20e37d1a58e922d7e936b749d4df9452 to your computer and use it in GitHub Desktop.
Hide WebAssign responses and answer keys
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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