This bookmarklet quickly converts a GitHub Pages (github.io) URL to its corresponding GitHub repository URL.
When browsing GitHub Pages websites, you might want to quickly access the source repository. This bookmarklet automates that process, saving you time and effort.
- Click the bookmarklet while on a github.io page.
- The bookmarklet extracts the username and repository name from the URL.
- It then redirects you to the corresponding GitHub repository.
- Create a new bookmark in your browser.
- Name it "GitHub Pages to Repo" (or any name you prefer).
- In the URL field, paste the entire code from the github_io_to_repo.js file.
Simply click the bookmarklet when you're on a github.io page to be redirected to its repository.
- From:
https://username.github.io/repository/
- To:
https://github.com/username/repository/
- Works only on properly formatted github.io URLs.
- Does not locate specific files within the repository.
The JavaScript code for this bookmarklet can be found in the github_io_to_repo.js file in this repository.