fixed redirects
This commit is contained in:
@@ -257,9 +257,18 @@
|
||||
(set-popup-rule! "^\\*osm\\*" :ignore t))
|
||||
|
||||
;; eww
|
||||
(defun opal/eww-reddit-redirect(url)
|
||||
"Redirect reddit.com to custom URL."
|
||||
(replace-regexp-in-string "https://www.reddit.com" "https://eddrit.com" url))
|
||||
;; eww
|
||||
(defun opal/eww-reddit-redirect (url)
|
||||
"Redirect reddit.com (with or without www) to a privacy frontend."
|
||||
(replace-regexp-in-string "^https://\\(www\\.\\)?reddit\\.com" "https://eddrit.com" url))
|
||||
|
||||
(defun opal/eww-x-redirect (url)
|
||||
"Redirect x.com (with or without www) to a privacy frontend."
|
||||
(replace-regexp-in-string "^https://\\(www\\.\\)?x\\.com" "https://xcancel.com" url))
|
||||
|
||||
(defun opal/eww-twitter-redirect (url)
|
||||
"Redirect twitter.com (with or without www) to a privacy frontend."
|
||||
(replace-regexp-in-string "^https://\\(www\\.\\)?twitter\\.com" "https://xcancel.com" url))
|
||||
|
||||
(global-set-key (kbd "C-c w") #'eww)
|
||||
(global-set-key (kbd "C-c f") #'elfeed-goodies/show-link-hint)
|
||||
@@ -275,7 +284,11 @@
|
||||
(setq reddit-proxy "https://eddrit.com")
|
||||
|
||||
;; Redirect reddit links to privacy respecting frontends.
|
||||
(setq eww-url-transformers '(eww-remove-tracking opal/eww-reddit-redirect))
|
||||
(setq eww-url-transformers
|
||||
'(eww-remove-tracking
|
||||
opal/eww-reddit-redirect
|
||||
opal/eww-twitter-redirect
|
||||
opal/eww-x-redirect))
|
||||
|
||||
;; Make sure eww opens in it's own buffer
|
||||
(after! eww
|
||||
|
||||
Reference in New Issue
Block a user