colab disconnecting script code example
Example 1: prevent colab from disconnecting
function ClickConnect(){
console.log("Clicked on connect button");
document.querySelector("colab-connect-button").click()
}
setInterval(ClickConnect,60000)
Example 2: stop colab from disconnecting
function ClickConnect(){
console.log("Working");
document.querySelector("#comments > span").click()
}
setInterval(ClickConnect,5000)