Last active
February 13, 2021 16:33
-
-
Save zckly/db453bd206a097d938c69c8beb70c0bd to your computer and use it in GitHub Desktop.
Autoloading Comments in Circle
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
var autoShowMoreComments = setInterval(function () { | |
const btn = document.getElementsByClassName('load-more__comments') | |
if (btn.length) { | |
btn[0].click() | |
} else { | |
//If there is no button, then remove this checker to prevent memory leaks | |
clearInterval(autoShowMoreComments); | |
return; | |
} | |
}, 400); // check every 400ms |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment