From 443b20a3a6a2127ad45a0627c1bf7e4e80ed4044 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 9 Sep 2021 16:39:30 -0500 Subject: Add `browse-url-in-teddit' function --- lisp/acdw-browse-url.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'lisp') diff --git a/lisp/acdw-browse-url.el b/lisp/acdw-browse-url.el index 93f470c..9f8e484 100644 --- a/lisp/acdw-browse-url.el +++ b/lisp/acdw-browse-url.el @@ -6,7 +6,7 @@ "Arguments to pass to mpv in `browse-url-mpv'.") (defun browse-url-mpv (url &optional new-window) - "Play `URL' in mpv." + "Play URL in mpv." (interactive (browse-url-interactive-arg "Video URL: ")) (ignore new-window) ;; mpv always opens a new window (let* ((url (browse-url-encode-url url)) @@ -112,6 +112,13 @@ Then, build `browse-url-button-regexp' with the new protocol." ;;; Browse-URL tweaks +;; convert reddit.com to teddit +(defun acdw/eww-browse-reddit-url (url &rest args) + "Browse a Reddit.com URL using Teddit." + (let* ((teddit "teddit.com") + (url (replace-regexp-in-string "reddit\\.com" teddit url))) + (eww-browse-url url args))) + ;; convert twitter.com to nitter (defun acdw/eww-browse-twitter-url (url &rest args) "Browse a Twitter.com URL using Nitter." -- cgit 1.4.1-21-gabe81