From 54b04c4a5f6e70c77296d3611f60e4aa1271ec0d Mon Sep 17 00:00:00 2001
From: Patrick Spek
Date: Sun, 5 Apr 2020 11:29:03 +0200
Subject: Twitter bad
---
.local/bin/open | 3 +++
1 file changed, 3 insertions(+)
(limited to '.local')
diff --git a/.local/bin/open b/.local/bin/open
index 66d58f6..0ba1c32 100755
--- a/.local/bin/open
+++ b/.local/bin/open
@@ -50,6 +50,9 @@ multi sub cmd (HttpUrl $t where *.hostname.ends-with('slack.com')) { "chromium-b
multi sub cmd (HttpUrl $t where *.hostname.ends-with('zaaksysteem.net')) { "chromium-browser '$t'" }
multi sub cmd (HttpUrl $t where *.hostname.ends-with('zaaksysteem.nl')) { "chromium-browser '$t'" }
+# 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')) }
+
# All other URLs should be opened with the preferred browser.
multi sub cmd (HttpUrl $t) { "%*ENV '$t'" }
--
cgit v1.1