summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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))))