Last active
May 19, 2025 11:08
GitHub pull request JS snippet to mark all ".mermaid" files as viewed (substitute for any file extension)
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
((suffixes) => {let skip = 0; let abort = false; [...$$(suffixes.map(suffix => `a[title$="${suffix}"]`).join(','))].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) => inpt.checked ? ++skip : setTimeout(() => {if (abort) return; inpt.click();}, (i - skip) * 1000))})([".mermaid",".export.mjs"]) |
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
((suffix) => {let skip = 0; 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) => inpt.checked ? ++skip : setTimeout(() => {if (abort) return; inpt.click();}, (i - skip) * 1000))})(".mermaid") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment