Bookmarklets let you send the currently open webpage to MeTube with one click from your bookmarks bar.
Prerequisites
- HTTPS: if you're on an HTTPS page (e.g. youtube.com), your MeTube instance must be served over HTTPS too — either with
HTTPS=true in the environment or behind an HTTPS reverse proxy (see Reverse proxy configurations) — otherwise the browser blocks the request as mixed content.
- CORS: bookmarklets run in the context of the current page, so their requests to MeTube are cross-origin. Add the origins of the sites where you use the bookmarklet to the
CORS_ALLOWED_ORIGINS environment variable, e.g. CORS_ALLOWED_ORIGINS=https://www.youtube.com,https://www.vimeo.com.
GitHub doesn't allow embedding JavaScript as a link, so create a new bookmark on your bookmarks bar manually and paste the code below as its URL. Change metube.domain.com to point to your MeTube instance.
Chrome
Contributed by kushfest.
Firefox
Contributed by shoonya75.
Toast notification variant
The above bookmarklets use alert() for notifications. This variant shows a toast instead (Chrome — for Firefox, replace the !function(){...}() wrapper with (function(){...})()):