Merge branch 'master' of git.opal.sh:opal/opalfiles
This commit is contained in:
@@ -267,9 +267,17 @@
|
|||||||
(set-popup-rule! "^\\*osm\\*" :ignore t))
|
(set-popup-rule! "^\\*osm\\*" :ignore t))
|
||||||
|
|
||||||
;; eww
|
;; eww
|
||||||
(defun opal/eww-reddit-redirect(url)
|
(defun opal/eww-reddit-redirect (url)
|
||||||
"Redirect reddit.com to custom URL."
|
"Redirect reddit.com (with or without www) to a privacy frontend."
|
||||||
(replace-regexp-in-string "https://www.reddit.com" "https://eddrit.com" url))
|
(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 w") #'eww)
|
||||||
(global-set-key (kbd "C-c f") #'elfeed-goodies/show-link-hint)
|
(global-set-key (kbd "C-c f") #'elfeed-goodies/show-link-hint)
|
||||||
@@ -285,7 +293,11 @@
|
|||||||
(setq reddit-proxy "https://eddrit.com")
|
(setq reddit-proxy "https://eddrit.com")
|
||||||
|
|
||||||
;; Redirect reddit links to privacy respecting frontends.
|
;; 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
|
;; Make sure eww opens in it's own buffer
|
||||||
(after! eww
|
(after! eww
|
||||||
|
|||||||
Reference in New Issue
Block a user