Created
January 12, 2021 10:05
-
-
Save egordm/f892b9f29895e9bb47912d7c2e7a4a2e to your computer and use it in GitHub Desktop.
Google Collab Periodic Conneciton Check
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
# https://stackoverflow.com/a/59226569 | |
interval = setInterval(function() { | |
console.log("working") | |
var selector = "#top-toolbar > colab-connect-button" | |
document.querySelector(selector).shadowRoot.querySelector("#connect").click() | |
setTimeout(function() { | |
document.querySelector(selector).shadowRoot.querySelector("#connect").click() | |
}, 1000) | |
}, 60*1000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment