Skip to content

Commit

Permalink
Fixed Colab breakage and released version 1.3.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
tdulcet committed Aug 30, 2024
1 parent fc66629 commit f809868
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Follow [these instructions](https://extensionworkshop.com/documentation/develop/
### Chromium/Chrome

1. Download the [webextension-polyfill](https://github.com/mozilla/webextension-polyfill) (specifically download the `browser-polyfill.js` file [from here](https://unpkg.com/webextension-polyfill/dist/))
2. Rename the[chromemanifest.json](chromemanifest.json) file to `manifest.json`
2. Rename the [chromemanifest.json](chromemanifest.json) file to `manifest.json`
3. Follow [these instructions](https://developer.chrome.com/docs/extensions/get-started/tutorial/hello-world) to install it in Chromium/Chrome

## Other Colab Extensions
Expand Down
2 changes: 1 addition & 1 deletion chromemanifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Colab Autorun and Connect",
"version": "1.3",
"version": "1.3.1",
"author": "Teal Dulcet and Daniel Connelly",

"description": "Automatically connect, reconnect and optionally run the first cell of notebooks in Google Colab.",
Expand Down
11 changes: 3 additions & 8 deletions content_script.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,10 @@ function run() {
const button = document.querySelector("colab-run-button");

if (button) {
button.dispatchEvent(new MouseEvent("mouseover", {
bubbles: true
}));
const title = button.title.toLowerCase();

if (title.includes("queued") || title.includes("executing") || title.includes("interrupt")) {
if (button.shadowRoot.getElementById("stopSymbolMask")) {
console.log(`Notebook already running, will recheck in ${seconds} seconds`);
// running = true;
} else {
} else { // button.shadowRoot.getElementById("playSymbolMask")
// console.log(button);
console.time(label);
console.log("Connecting and running first cell");
Expand Down Expand Up @@ -284,7 +279,7 @@ function stop() {
if (enabled) {
astop();

enabled = false;
enabled = running = false;
time = null;
console.log(`${TITLE} stopped`);
} else {
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Colab Autorun and Connect",
"version": "1.3",
"version": "1.3.1",
"author": "Teal Dulcet and Daniel Connelly",

"description": "Automatically connect, reconnect and optionally run the first cell of notebooks in Google Colab.",
Expand Down

0 comments on commit f809868

Please sign in to comment.