Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 722 Bytes

README.md

File metadata and controls

32 lines (25 loc) · 722 Bytes

Stop Colab from Disconnecting

Paste both the codes in console by Ctrl+Shift+I then click console

  • Paste below code to click connect button every minute
  • function ClickConnect() {
      console.log('Working')
      document
        .querySelector('#top-toolbar > colab-connect-button')
        .shadowRoot.querySelector('#connect')
        .click()
    }
    intervalTiming = setInterval(ClickConnect, 60000)
  • Below code add extra cells every minute you may alter this time
  • function ClickConnect(){
      console.log('Working');
      document.querySelector('colab-toolbar-button#toolbar-add-text').click();
    }
    intervalTiming = setInterval(ClickConnect, 60000);