added ability to open current eww url in system browser...stupid js
This commit is contained in:
parent
5f5c4c485f
commit
8350c91f71
|
|
@ -779,6 +779,19 @@
|
|||
(setq shr-image-animate nil)
|
||||
(setq browse-url-browser-function 'eww-browse-url)
|
||||
|
||||
; for pages that require JS for some stupid reason...
|
||||
(defun browse-url-xdg-open (url &optional _new-window)
|
||||
"Open URL using the default browser via `xdg-open'."
|
||||
(interactive (browse-url-interactive-arg "URL: "))
|
||||
(call-process "xdg-open" nil 0 nil url))
|
||||
|
||||
(defun eww-open-in-default-browser ()
|
||||
"Open the current EWW page in the default system browser."
|
||||
(interactive)
|
||||
(browse-url-xdg-open (eww-current-url)))
|
||||
|
||||
(define-key eww-mode-map (kbd "C-c o") 'eww-open-in-default-browser)
|
||||
|
||||
(provide 'init)
|
||||
|
||||
;;; init.el ends here
|
||||
|
|
|
|||
Loading…
Reference in New Issue