From 94643dfd001fa66319d857fa260d15e543ea9f5d Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Mon, 30 Oct 2023 22:40:52 +1100 Subject: [emacs] Adding traclicker and url-rewrite, as well as customizations --- emacs/.emacs.d/init/ycp-web.el | 94 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) (limited to 'emacs/.emacs.d/init/ycp-web.el') diff --git a/emacs/.emacs.d/init/ycp-web.el b/emacs/.emacs.d/init/ycp-web.el index a81c2b0..f6da859 100644 --- a/emacs/.emacs.d/init/ycp-web.el +++ b/emacs/.emacs.d/init/ycp-web.el @@ -61,6 +61,100 @@ (require 'osm-ol) ) +(my-package url-rewrite + (setq my-nitter-hosts + '("nitter.net" + "nitter.nixnet.services" + "nitter.unixfox.eu" + "nitter.mint.lgbt" + "nitter.esmailelbob.xyz" + "nitter.poast.org" + "nitter.cz" + "nitter.privacydev.net" + "nitter.projectsegfau.lt" + "nitter.eu.projectsegfau.lt" + "nitter.in.projectsegfau.lt" + "nitter.us.projectsegfau.lt" + "nitter.soopy.moe" + "nitter.rawbit.ninja" + "nitter.d420.de" + "bird.habedieeh.re" + "nitter.x86-64-unknown-linux-gnu.zip" + "nitter.woodland.cafe" + "nitter.dafriser.be" + "nitter.catsarch.com" + "nitter.perennialte.ch" + "nitter.salastil.com" + "n.populas.no" + "nt.ggtyler.dev" + "nitter.uni-sonia.com" + "n.opnxng.com" + "nitter.ktachibana.party" + "nitter.tinfoil-hat.net")) + (setq my-invidious-hosts + '("yewtu.be" + "invidious.io.lol" + "invidious.slipfox.xyz" + "invidious.drgns.space" + "invidious.protokolla.fi" + "invidious.flokinet.to" + "iv.ggtyler.dev" + "yt.drgnz.club" + "invidious.lunar.icu" + "invidious.private.coffee" + "invidious.fdn.fr" + "vid.puffyan.us" + "invidious.asir.dev" + "onion.tube" + "iv.melmac.space" + "invidious.projectsegfau.lt" + "inv.in.projectsegfau.lt" + "invidious.privacydev.net" + "iv.datura.network" + "inv.tux.pizza" + "iv.nboeck.de" + "invidious.perennialte.ch" + "yt.oelrichsgarcia.de" + "inv.citw.lgbt" + "inv.zzls.xyz" + "invidious.einfachzocken.eu" + "yt.cdaut.de" + "yt.artemislena.eu" + "vid.priv.au" + "anontube.lvkaszus.pl" + "invidious.no-logs.com")) + (setq url-rw-rules + '((:name ddg-result + :description "duckduckgo result transform." + :match (concat url-rw-www-re (rx "duckduckgo.com/l/?uddg=")) + :actions ((replace-by-redirect "uddg"))) + (:name google-to-ddg + :description "Google search to duckduckgo html." + :match (concat url-rw-www-re (rx "google.com/search?q=")) + :actions ((replace-host "html.duckduckgo.com") + (replace-path "/html"))) + (:name reddit-to-old + :description "Reddit to old Reddit" + :match (concat url-rw-www-re (rx "reddit.com")) + :actions ((replace-host "old.reddit.com"))) + (:name strip-utm + :description "Strip utm_* queries." + :match "\\