forked from drmichaeldouglass/blenderGoogleGPU
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathColabTimeoutJavaScript
More file actions
27 lines (20 loc) · 833 Bytes
/
ColabTimeoutJavaScript
File metadata and controls
27 lines (20 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#########################################
#Javascript Code to Prevent Colab from
#timing out while rendering Blender scenes
#########################################
#########################################
#Press "Control + Shift + I" while in the
#browser (command + option + c in Safari)
and paste the following code into the console tab.
#The 60,000 is how many milliseconds to wait before clicking
#########################################
function ClickConnect(){
console.log("Working");
document.querySelector("#top-toolbar > colab-connect-button").shadowRoot.querySelector("#connect").click();
}
var clicker = setInterval(ClickConnect,60000);
##########################################
#and then type the following code to stop
#the clicker code
#########################################
clearInterval(clicker);