summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2024-05-24 23:37:39 +0100
committerjao <jao@gnu.org>2024-05-24 23:37:39 +0100
commit72ccf8a3dc84dc6d5cf46d26fcd0b4490cb980fe (patch)
tree53c75dc6581bb32d4f1f544eacc8e5187ad24009
parent04cbee7c294553daf439bb94c3a35f0b28127d34 (diff)
downloadelibs-72ccf8a3dc84dc6d5cf46d26fcd0b4490cb980fe.tar.gz
elibs-72ccf8a3dc84dc6d5cf46d26fcd0b4490cb980fe.tar.bz2
eww: recovering my own autoreadable (better reload)
-rw-r--r--custom/jao-custom-eww.el19
1 files changed, 15 insertions, 4 deletions
diff --git a/custom/jao-custom-eww.el b/custom/jao-custom-eww.el
index 0409fc5..a3f4df9 100644
--- a/custom/jao-custom-eww.el
+++ b/custom/jao-custom-eww.el
@@ -201,10 +201,11 @@ It should be the title of the web page as returned by `rdrview'"
(eww-header-line-format " %u")
(eww-form-checkbox-selected-symbol "☒")
(eww-buffer-name-length 180)
- (eww-readable-urls '("guardian\\.co\\.uk"
- "theguardian\\.com"
- "eldiario\\.es"
- "theconversation")))
+ ;; (eww-readable-urls '("guardian\\.co\\.uk"
+ ;; "theguardian\\.com"
+ ;; "eldiario\\.es"
+ ;; "theconversation"))
+ )
:config
(with-eval-after-load "org" (require 'ol-eww nil t))
@@ -245,6 +246,16 @@ It should be the title of the web page as returned by `rdrview'"
("C-c C-w" . jao-eww-close)
("M-i" . eww-toggle-images))))
+;;; auto-readable
+(defvar jao-eww-auto-readable-urls
+ (regexp-opt '("guardian.co.uk" "theguardian.com" "github.com" "eldiario.es")))
+
+(defun jao-eww-autoread ()
+ (when (string-match-p jao-eww-auto-readable-urls (or (eww-current-url)))
+ (eww-readable)))
+
+(add-hook 'eww-after-render-hook #'jao-eww-autoread)
+
;;; fixes for shr image rendering
(require 'shr)