From 7654d70fb3e261afbcd9f0dfa0568f4937796f40 Mon Sep 17 00:00:00 2001
From: Patrick Spek
Date: Thu, 16 Apr 2020 14:06:29 +0200
Subject: Add youtube to invidious rewrite
---
.local/bin/open | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
(limited to '.local')
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.
--
cgit v1.1