YouTube Blocker blocks YouTube videos not in the Education, Science & Technology, or Howto & Style categories so you can focus on educational videos.
Diagram here
- Each page has a different local storage
- Understand Background action vs Browser action
- Background Script has the context of the extension while
- Content Script has the context of the web page. It has restrictions on CORS so only the Background Script can run the CORS API requests.
- Content Script sends a Chrome message to the Background Script on whether to block the YouTube video or not
- Logo was made in Adobe Photoshop
- Chrome Extension API
- Youtube Data API
- fork repo if desired
- clone repo locally
- go to chrome://extensions
- Press
Load unpacked
in top left corner - Select your cloned youtube-blocker folder
- Enable the extension and develop in your IDE.
- Changes should reflect automatically after you save
- If not, then press the refresh button on the extension card in the chrome://extensions page
Screenshot 1) Chrome Extension Page
Screenshot 2) Chrome Extension popup.html