The following files have been adapted from ViewTube userscript 'protocol' [1] instructions. But I find no reason using such a complex script just for opening a video to mpv, so instead I opted out to using a bookmarklet. The files may be installed as follows:
user$ mkdir -p $HOME/.local/{bin,share/applications}
user$ cp notube.desktop $HOME/.local/share/applications/notube.desktop
user$ install -D -m 755 notube.sh $HOME/.local/bin/notube.sh
user$ xdg-mime default notube.desktop x-scheme-handler/notube
After that, make a new bookmark naming it e.g. Play with MPV and set location to the body of notube.js. From there, on a supported from youtube-dl site click the bookmarklet.
Firefox users need to perform some additional steps. Goto about:config
, make a
new boolean
type key named network.protocol-handler.expose.notube
and set
its value to false
. Then associate the protocol using the following link:
>tfw the botnet wants me to starve
In case the url isn't working open this and click it there.
On another note, Firefox users don't even have to open the page and instead they
can goto to the (as it is obvious from the bookmark) url notube:<url>
replacing <url>
of course with the site url or even a direct link to a video
or audio.