diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7da7251..2871cff 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,7 +1,7 @@ # Open in Colab Chrome Extension -This is a chrome extension that allows notebooks on github to be opened in -Google [Colaboratory](https://colab.research.google.com) in one click. See the +This is a Chrome extension that allows notebooks on GitHub to be opened in +[Google Colaboratory](https://colab.research.google.com) in one click. See the Colaboratory [FAQ](https://research.google.com/colaboratory/faq.html) for details. diff --git a/README.md b/README.md index 5221132..9cb54f1 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,18 @@ -# Open In Colab Chrome Extension +# Open in Colab Chrome Extension -This is a simple chrome extension that, when clicked when viewing a Jupyter -notebook on github, will open that notebook in -[Google Colab](http://colab.research.google.com/). +This is a simple Chrome extension that, when clicked when viewing a Jupyter +notebook on GitHub, will open that notebook in +[Google Colab](https://colab.research.google.com/). The extension simply provides a URL redirect: it reads the current URL and opens -a new tab at http://colab.research.google.com/github/ with the user, repository, -and notebook path. +a new tab at https://colab.research.google.com/github/ (or /gist/) with the +user, repository, and notebook path. ## Installing the Extension The latest release of the extension can be installed from the [Chrome Web Store](https://chrome.google.com/webstore/detail/open-in-colab/iogfkhleblhcpcekbiedikdehleodpjo). -## Development Install +## Support -To install the extension directly from source: - -1. Clone this repository to your local disk. -2. Open the Chrome browser, and navigate to chrome://extensions. -3. Ensure that developer mode is enabled (see the switch in the upper-right). -4. Click "Load Unpacked" and choose the location of the `open_in_colab` - repository. You should see a little colab icon appear in your Chrome - extensions icons in your browser bar. -5. Navigate to a notebook on github (e.g. - https://github.com/googlecolab/colabtools/blob/main/notebooks/colab-github-demo.ipynb), - and click the extension icon to open the notebook in Colab. +For help with Colaboratory, see https://github.com/googlecolab/colabtools/. diff --git a/js/background.js b/js/background.js index b24ea9c..693a731 100644 --- a/js/background.js +++ b/js/background.js @@ -40,6 +40,7 @@ chrome.action.onClicked.addListener(function(tab) { if (url) { chrome.tabs.create({'url': url}); } else { - alert('Current page is not recognized as a github-hosted notebook'); + console.warn(`Current page (${ + tab.url}) is not recognized as a GitHub-hosted notebook.`); } });