Created
May 15, 2023 11:03
-
-
Save ImDuong/1ac1c9fa92508e1693ad0c6421a6bfc6 to your computer and use it in GitHub Desktop.
colab session timeout
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
| // to define and start interval | |
| function ClickConnect(){ | |
| console.log("Working"); | |
| document.querySelector("#top-toolbar > colab-connect-button").shadowRoot.querySelector("#connect").click(); | |
| } | |
| // set timer for every 5 minutes | |
| var clicker = setInterval(ClickConnect,60000 * 5); | |
| clicker; | |
| // to clear interval | |
| clearInterval(clicker); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment