From 5b3bd3ed3824c09318c8ddb185983958e7ec2580 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Mon, 8 Apr 2024 17:58:03 +0300 Subject: nyxt:(config) Remove old-reddit handlers --- .config/nyxt/config.lisp | 53 ------------------------------------------------ 1 file changed, 53 deletions(-) (limited to '.config/nyxt') diff --git a/.config/nyxt/config.lisp b/.config/nyxt/config.lisp index 12e6b53..4367e12 100644 --- a/.config/nyxt/config.lisp +++ b/.config/nyxt/config.lisp @@ -6,8 +6,6 @@ (when (probe-file quicklisp-init) (load quicklisp-init))) - - (load "~/.config/nyxt/style.lisp") (load "~/.config/nyxt/keys.lisp") (load "~/.config/nyxt/default-search.lisp") @@ -53,54 +51,3 @@ Upstream Nyxt doesn't have it because it may break some websites.") (preferred-user-agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Safari/605.1.15" :doc "Mimic Chrome on MacOS."))) - - -(defparameter old-reddit-handler - (url-dispatching-handler - 'old-reddit-dispatcher - (match-host "www.reddit.com") - (lambda (url) - (quri:copy-uri url :host "old.reddit.com")))) - - -(defun old-reddit-handler (request-data) - (let ((url (url request-data))) - (setf (url request-data) - (if (search "reddit.com" (quri.uri:uri-host url)) - (progn - (setf (quri.uri:uri-host url) "old.reddit.com") - (log:info "Switching to old Reddit: ~s" - (render-url url)) - url) - url))) - request-data) - -;; (url-dispatching-handler 'old-reddit-handler ) - - -;; (define-configuration web-buffer -;; (request-resource-hook -;; (hooks:add-hook %slot-value% -;; (url-dispatching-handler -;; 'doi-link-dispatcher -;; (match-scheme "doi") -;; (lambda (url) -;; (quri:uri (format nil "https://www.reddit.com/~a" -;; (quri:uri-path url)))))))) - -;; (defmethod customize-instance ((buffer web-buffer)) -;; (hooks:add-hook -;; (request-resource-hook buffer) -;; (url-dispatching-handler -;; 'transmission-magnet-links -;; (match-scheme "magnet") -;; "transmission-remote --add ~a")) -;; (hooks:add-hook -;; (request-resource-hook buffer) -;; (url-dispatching-handler -;; 'emacs-file -;; (match-scheme "file") -;; (lambda (url) -;; (uiop:launch-program -;; `("emacs" ,(quri:uri-path url))) -;; nil)))) -- cgit v1.2.3