diff options
author | Patrick Spek <p.spek@tyil.nl> | 2020-04-16 14:06:29 +0200 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2021-08-14 11:59:35 +0200 |
commit | 7654d70fb3e261afbcd9f0dfa0568f4937796f40 (patch) | |
tree | 33a819805bad42dacadedfdd0d02f82aa85b9de9 /.local | |
parent | 2bd95c9900908d48bb25797d72d4596b46dec430 (diff) |
Add youtube to invidious rewrite
Diffstat (limited to '.local')
-rwxr-xr-x | .local/bin/open | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/.local/bin/open b/.local/bin/open index 0ba1c32..ae290b7 100755 --- a/.local/bin/open +++ b/.local/bin/open @@ -1,4 +1,4 @@ -#! /usr/bin/env raku +#!/usr/bin/env raku use URL; @@ -52,6 +52,9 @@ multi sub cmd (HttpUrl $t where *.hostname.ends-with('zaaksysteem.nl')) { "chrom # Rewrite bad site to good site multi sub cmd (HttpUrl $t is copy where *.hostname eq "twitter.com") { callwith(URL.new(|$t.Hash, hostname => 'nitter.net')) } +multi sub cmd (HttpUrl $t is copy where *.hostname eq "www.youtube.com") { callwith(URL.new(|$t.Hash, hostname => 'invidio.us')) } +multi sub cmd (HttpUrl $t is copy where *.hostname eq "youtu.be") { callwith(URL.new(|$t.Hash, hostname => 'invidio.us')) } +multi sub cmd (HttpUrl $t is copy where *.hostname eq "youtube.com") { callwith(URL.new(|$t.Hash, hostname => 'invidio.us')) } # All other URLs should be opened with the preferred browser. |