Skip to content

Instantly share code, notes, and snippets.

@NguyenKhong
Last active April 21, 2021 14:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NguyenKhong/614f80ffe1a9e68bb402c092c0f18708 to your computer and use it in GitHub Desktop.
Save NguyenKhong/614f80ffe1a9e68bb402c092c0f18708 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Colab Alive
// @namespace colab
// @version 0.2
// @description Colab Alive
// @author Nguyen Khong
// @match https://colab.research.google.com/drive/*
// @run-at document-start
// ==/UserScript==
document.addEventListener('DOMContentLoaded', function() {
function ClickConnect(){
console.log("Working");
try{
document.querySelector("#top-toolbar > colab-connect-button").shadowRoot.querySelector("#connect").click();
}catch(e){}
}
setInterval(ClickConnect,60000);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment