YouTube to Watch2Gether (Y2W)

**Send YouTube videos to your Watch2Gether room with a single click!**
_Because copy-pasting URLs is so 2020_ ๐
[](https://chromewebstore.google.com/detail/y2w-youtube-to-watch2geth/afgajabndpahomibkdlpgejbfmlfckig)
[](LICENSE)
[](CONTRIBUTING.md)
[](https://developer.mozilla.org/en-US/docs/Web/JavaScript)
[](https://developer.chrome.com/docs/extensions/mv3/)
๐ Why This Exists
You know that moment when youโre watching YouTube and find the perfect video to share with your friends on Watch2Gether? Yeah, me too. The whole copy URL โ switch tabs โ paste โ hope it works thing got old real fast.
So I built Y2W โ a simple Chrome extension that adds a โY2Wโ button right in the YouTube player. One click and boom, your video is in the W2G room. No more tab juggling!
๐ What is Y2W?
YouTube to Watch2Gether (Y2W) is a Chrome extension that seamlessly integrates with YouTube. Itโs literally just a button that does one thing really well: sends videos to your Watch2Gether room instantly.
โจ Features
- ๐ฌ One-Click Magic: See video โ Click button โ Video appears in W2G. Thatโs it!
- ๐ Feels Native: The button looks like it belongs there (because it does)
- ๐ฏ Works Everywhere: Theater mode? โ Fullscreen? โ Mobile view? โ We got you
- ๐ Your Keys, Your Rules: Everything stays in your browserโs secure storage
- โก Zero Bloat: So lightweight youโll forget itโs there (until you need it)
๐ Installation
From Chrome Web Store (Recommended)
๐ Y2W is now available on the Chrome Web Store!
- Install Y2W from Chrome Web Store
- Click โAdd to Chromeโ
- The extension will be installed automatically
- Follow the configuration steps below
Manual Installation (Developer Mode)
- Download the Extension
git clone https://github.com/fedevgonzalez/youtube-to-w2g.git
cd youtube-to-w2g
- Load in Chrome
- Open Chrome and navigate to
chrome://extensions/
- Enable Developer mode (toggle in top right)
- Click Load unpacked
- Select the
youtube-to-w2g
folder
- Configure Your Credentials
- Click the Y2W extension icon in your toolbar
- Enter your Watch2Gether API key and Room Access Key
- Click Save Configuration
๐ Getting Watch2Gether Credentials
API Key
- Visit Watch2Gether API
- Log in to your W2G account
- Navigate to the API section
- Generate or copy your API key
Room Access Key
- Create or join a W2G room
- Open the room settings
- Look for โRoom Access Keyโ or โRoom API Accessโ
- Copy the key
Pro tip: Keep these keys safer than your Netflix password. Seriously, donโt share them!
๐ป Usage
Once installed and configured:
- Navigate to any YouTube video
- Look for the โY2Wโ button in the video player controls
- Click the button to instantly send the video to your Watch2Gether room
- The button will show a checkmark (โ) when successful
- Normal: Blue โY2Wโ โ Ready to party
- Loading: โโฆโ โ Working on it, chief
- Success: Green โ โ Mission accomplished!
- Error: Red โERRORโ โ Oops, something went sideways
๐ ๏ธ Development
Prerequisites
- Chrome browser
- Basic knowledge of Chrome Extension development
- ImageMagick (optional, for icon generation)
Project Structure
youtube-to-w2g/
โโโ manifest.json # Extension manifest (V3)
โโโ popup.html # Configuration popup
โโโ css/ # Styles
โ โโโ popup.css
โโโ js/ # JavaScript files
โ โโโ background.js # Service worker
โ โโโ content.js # Content script
โ โโโ popup.js # Popup logic
โโโ assets/ # Resource files
โโโ icons/ # Extension icons
โ โโโ y2w.svg # Source icon
โโโ images/ # Promotional images
Making Changes
- Edit the relevant files
- Reload the extension in
chrome://extensions/
- Refresh YouTube to test changes
๐ง Troubleshooting
Common Issues (aka โHalp, itโs broken!โ)
โWhereโs my button?!โ
- Refresh the YouTube page
- Make sure the extension is enabled in
chrome://extensions/
- Check if youโre on a YouTube video page (not the homepage or search)
โConfiguration Missingโ (aka you forgot to set it up):
- Click the extension icon and enter your credentials
- Make sure both API Key and Room Access Key are saved
โFailed to sendโ (the dreaded red button):
- Verify your credentials are correct
- Check if your W2G room is active
- Ensure you have a stable internet connection
โIt worked yesterday!โ syndrome:
- Reload the extension in
chrome://extensions/
- Clear browser cache and cookies for YouTube
๐บ๏ธ Roadmap
๐ API Reference
The extension uses the Watch2Gether API v1:
Endpoint: POST https://api.w2g.tv/rooms/{roomKey}/playlists/current/playlist_items/sync_update
Headers:
{
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": "Bearer {apiKey}"
}
Request Body:
{
"w2g_api_key": "{apiKey}",
"add_items": [{
"url": "https://www.youtube.com/watch?v={videoId}",
"title": "{videoTitle}"
}]
}
๐ค Contributing
Found a bug? Have an idea? Want to make the button do a backflip? Iโd love your help! Check out the Contributing Guidelines to get started.
Seriously though, this project is better with your input. Donโt be shy!
Quick Start
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
)
- Commit your changes (
git commit -m 'Add some AmazingFeature'
)
- Push to the branch (
git push origin feature/AmazingFeature
)
- Open a Pull Request
๐ Found a Bug? Got an Idea?
First, check if someone beat you to it in the issue tracker. If not, create a new issue and letโs make Y2W better together!
I actually read these, promise. ๐
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Shoutouts
- Watch2Gether for building an awesome platform and having an API
- The Chrome Extension docs that actually make sense (rare, I know)
- Everyone whoโs contributed, reported bugs, or even just used this thing
- My friends who kept asking โis it done yet?โ โ yes, itโs done! ๐
๐ฌ Need Help?
๐ Support
If Y2W saved you some time and you want to say thanks:
Made with โค๏ธ (and lots of YouTube videos) by
fedevgonzalez
If you're reading this, you're awesome! ๐