diff options
author | Pierre Neidhardt <mail@ambrevar.xyz> | 2022-09-06 09:02:32 +0200 |
---|---|---|
committer | Pierre Neidhardt <mail@ambrevar.xyz> | 2022-11-09 10:13:16 +0100 |
commit | 684066a52ed65d4bb60c63510e9a682a9c43e556 (patch) | |
tree | 3d525b719dde952d4e07ab925bb6eb0b63095da4 /source/mode/history.lisp | |
parent | bae36d8da092db8159d567c8aabe7e600b9340bb (diff) |
mode/history: Extract blocked-p.
Diffstat (limited to 'source/mode/history.lisp')
-rw-r--r-- | source/mode/history.lisp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/mode/history.lisp b/source/mode/history.lisp index f54a534e9..48e4d4aa2 100644 --- a/source/mode/history.lisp +++ b/source/mode/history.lisp @@ -349,10 +349,14 @@ internally, but this display is clearer and more navigable." (:p (format nil "The last ~a history entries:" limit)) (:ul (:raw (nyxt::history-html-list :limit limit))))) +(export-always 'blocked-p) +(defun blocked-p (url mode) + (find-if (rcurry #'str:starts-with? (render-url url)) + (history-blocklist mode))) + (defun add-url-to-history (url buffer mode) (unless (or (url-empty-p url) - (find-if (rcurry #'str:starts-with? (render-url url)) - (history-blocklist mode))) + (blocked-p url mode)) (log:debug "Notify URL ~a for buffer ~a with load status ~a" url buffer |