YouTube Link Finder is a simple browser extension that identifies YouTube video links on a loaded webpage (including both 'watch' and 'embed' links) and displays them in a popup where you can easily copy the link. You can also add additional patterns to search for custom links.
- Detects YouTube links on the current webpage.
- Displays the links in a popup with an option to copy them.
- Easy to extend with additional link patterns.
Clone this repository or download it as a ZIP file and extract it.
git clone https://github.com/your-username/YouTubeLinkFinder.gitEnsure that the project directory structure is as follows:
YouTubeLinkFinder/
│
├── manifest.json
├── background.js
├── content.js
├── popup.html
├── popup.js
├── icons/
│ ├── icon16.png
│ ├── icon48.png
│ ├── icon128.png
└── README.md
- Open Chrome and go to
chrome://extensions/. - Enable Developer mode by clicking the toggle in the top-right corner.
- Click on the Load unpacked button.
- Select the
YouTubeLinkFinderdirectory from your file system.
- Visit any webpage with YouTube links (e.g.,
https://www.youtube.com). - Click on the extension icon in the toolbar.
- A popup will appear showing all detected YouTube links. You can click on any link to open it in a new tab or copy it.
If you want to add more patterns to detect different kinds of YouTube links, you can modify the content.js file. Add your custom regex patterns to the patterns array.
Example:
const patterns = [
/https?:\/\/(?:www\.)?youtube\.com\/watch\?v=([a-zA-Z0-9_-]+)/,
/https?:\/\/(?:www\.)?youtu\.be\/([a-zA-Z0-9_-]+)/,
/https?:\/\/(?:www\.)?youtube\.com\/embed\/([a-zA-Z0-9_-]+)/,
/your-custom-regex-here/
];You can replace the icons in the icons/ folder with your own, just ensure they are named icon16.png, icon48.png, and icon128.png, corresponding to the required sizes.
This project is licensed under the MIT License.