Skip to content

Commit

Permalink
No public description
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 702876363
  • Loading branch information
colaboratory-team committed Dec 4, 2024
1 parent d6dc0c8 commit df3f3d3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 21 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
26 changes: 8 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -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/.
3 changes: 2 additions & 1 deletion js/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.`);
}
});

0 comments on commit df3f3d3

Please sign in to comment.