From 6db7593ecc6e253a5fc346e9486d1f41c16d1055 Mon Sep 17 00:00:00 2001 From: jao Date: Fri, 3 Dec 2021 02:07:17 +0000 Subject: more urls as video urls --- init.org | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'init.org') diff --git a/init.org b/init.org index 09d877c..f0b0b7d 100644 --- a/init.org +++ b/init.org @@ -1439,7 +1439,12 @@ "infoq.com") t))) - (defun jao-video--url-p (url) (string-match-p jao-video--url-rx url)) + (defvar jao-video--ext-rx + (format "^https?://.+/.+\\.%s" (regexp-opt '("mp3" "webm" "mp4")))) + + (defun jao-video--url-p (url) + (or (string-match-p jao-video--url-rx url) + (string-match-p jao-video--ext-rx url))) (defun jao--remote-run (url prg) (let ((args (format "%s %s" prg (shell-quote-argument url)))) -- cgit v1.2.3