diff --git a/README.md b/README.md index a4a5df1..33f5f94 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/chromemanifest.json b/chromemanifest.json index 28488bf..7771534 100644 --- a/chromemanifest.json +++ b/chromemanifest.json @@ -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.", diff --git a/content_script.js b/content_script.js index 511d042..55afe4b 100644 --- a/content_script.js +++ b/content_script.js @@ -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"); @@ -284,7 +279,7 @@ function stop() { if (enabled) { astop(); - enabled = false; + enabled = running = false; time = null; console.log(`${TITLE} stopped`); } else { diff --git a/manifest.json b/manifest.json index bbc6385..310fe28 100644 --- a/manifest.json +++ b/manifest.json @@ -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.",