Created
March 15, 2021 01:56
-
-
Save fobidlim/f528a939c25137657440360c11119f5f to your computer and use it in GitHub Desktop.
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
// toggle all to viewed | |
document.querySelectorAll('.js-reviewed-checkbox').forEach((elem => { | |
if (elem.checked) { return } | |
var clickEvent = new MouseEvent('click'); | |
elem.dispatchEvent(clickEvent); | |
})) | |
// toggle all to not-viewed | |
document.querySelectorAll('.js-reviewed-checkbox').forEach((elem => { | |
if (!elem.checked) { return } | |
var clickEvent = new MouseEvent('click'); | |
elem.dispatchEvent(clickEvent); | |
})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment