Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Create a Colab link for notebook from GitHub
javascript:(function(){var url=location.href;var res=url.split("github.com/");var site=res[1];colabGitUrl="https://colab.research.google.com/github/"+site;window.prompt("Colab gitpuller link",colabGitUrl);})();
@misterhay

This comment has been minimized.

Copy link
Owner Author

misterhay commented Oct 30, 2019

var url = location.href;
var res = url.split("github.com/");
var site = res[1];
colabGitUrl = "https://colab.research.google.com/github/" + site;
window.prompt("Colab gitpuller link",colabGitUrl);

@misterhay

This comment has been minimized.

Copy link
Owner Author

misterhay commented Nov 4, 2019

If you prefer a bookmarklet that just opens the notebook in Colab:

javascript:(function(){var url=location.href;var res=url.split("github.com/");var site=res[1];colabGitUrl="https://colab.research.google.com/github/"+site;window.open(colabGitUrl);})();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.