Last active
February 19, 2024 11:50
-
-
Save benjie/4f844fa6d90674d2f6b0ab1ed5f31046 to your computer and use it in GitHub Desktop.
GitHub pull request JS snippet to mark all ".mermaid" files as viewed (substitute for any file extension)
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
((suffix) => {let abort = false; [...$$(`a[title$="${suffix}"]`)].map(el => {const checks = el.parentNode.parentNode.parentNode.querySelectorAll('.js-reviewed-checkbox');if (checks.length !== 1) { throw new Error("Script out of date?");} return checks[0]}).forEach((inpt, i) => setTimeout(() => {if (abort || inpt.checked) return; inpt.click();}, i * 1000))})(".mermaid") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment