Created
September 15, 2025 14:06
-
-
Save kadimi/1b1b8480e4a3026d9cb6a180be273414 to your computer and use it in GitHub Desktop.
Bookmarklet for Khan Academy to fix question selection and transtlation
This file contains hidden or 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
| javascript: (function () { | |
| const firstRenderer = document.querySelector("div.perseus-renderer"); | |
| if (firstRenderer) { | |
| const paragraphs = firstRenderer.querySelectorAll( | |
| ":scope > div.paragraph[data-perseus-paragraph-index]", | |
| ); | |
| const paragraphsExceptLast = Array.from(paragraphs).slice(0, -1); | |
| paragraphsExceptLast.forEach((p) => { | |
| if (p.querySelector("span.mathjax-wrapper")) { | |
| p.textContent = p.textContent.replace(/____/g, "[N]"); | |
| } | |
| }); | |
| } | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment