Add `browse-url-in-teddit' function
This commit is contained in:
parent
3e8be58586
commit
443b20a3a6
2
init.el
2
init.el
|
@ -1224,7 +1224,7 @@ specific to most general, they are these:
|
|||
w3m-link
|
||||
w3m-message-link))
|
||||
(link-hint-define-type type
|
||||
:open-secondary browse-url-secondary-browser-function))
|
||||
:open-secondary browse-url-secondary-browser-function))
|
||||
|
||||
(:option link-hint-avy-style 'at)
|
||||
(:global "C-;"
|
||||
|
|
|
@ -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."
|
||||
|
|
Loading…
Reference in New Issue