Reconnecting colab

Recently I noticed that my colab notebooks get too often disconnected. Yes, their run takes over an hour, which is a usual timing for a seminar. I just want to test that they run by executing all cells and leaving my workplace.

Here is how to set up an automatic reconnect using javascript functions that one can enter to the browser console:

function ConnectButton() {console.log("Working");document.querySelector("#connect").click()}
setInterval(ConnectButton,600000);