summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-12-03 02:07:17 +0000
committerjao <jao@gnu.org>2021-12-03 02:09:02 +0000
commit6db7593ecc6e253a5fc346e9486d1f41c16d1055 (patch)
tree6c9049b95b898945367ca70eca2175e1ee9d1c3c
parentbba6d05341cd7275d9485aab8d85dc8b03f3e103 (diff)
downloadelibs-6db7593ecc6e253a5fc346e9486d1f41c16d1055.tar.gz
elibs-6db7593ecc6e253a5fc346e9486d1f41c16d1055.tar.bz2
more urls as video urls
-rw-r--r--init.org7
1 files changed, 6 insertions, 1 deletions
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))))