From 4f72e23f72f9712999b8f629a4c62d6f78b65d3b Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sat, 7 Aug 2021 15:05:16 -0500 Subject: Add twitter.com URL handling TODO: This could be smarter, e.g. not going to nitter if twitter.com/t.co is part of the URL query. --- lisp/acdw.el | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lisp') diff --git a/lisp/acdw.el b/lisp/acdw.el index 9d8c489..be12dd6 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el @@ -497,6 +497,15 @@ Then, build `browse-url-button-regexp' with the new protocol." (add-to-list 'acdw/button-protocols proto) (setq-default browse-url-button-regexp (acdw/build-button-url-regexp))) +;;; Browse-URL tweaks + +;; convert twitter.com to nitter +(defun acdw/eww-browse-twitter-url (url &rest args) + "Browse a Twitter.com URL using Nitter." + (let* ((nitter "nitter.snopyta.org") + (url (replace-regexp-in-string "twitter\\.com" nitter url))) + (eww-browse-url url args))) + ;;; Recentf renaming with dired ;; from ... somewhere. 'rjs', apparently? -- cgit 1.4.1-21-gabe81