summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-07-05 09:38:56 +0300
committerThanos Apollo <[email protected]>2023-07-05 18:13:58 +0300
commitbddb947f80a55eff889f7fc8439aeb6de8eff1fa (patch)
treec35791e6c6b81462a115cc805cb9b6ff11baef8b
parentb5fa94beef7d33ad0f211bd5be19d038f2dba67a (diff)
Add yeetube-check-if-youtube
Check if it's youtube Will be used to differentiate between invidious/youtube
-rw-r--r--yeetube.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/yeetube.el b/yeetube.el
index b9b0780..8834601 100644
--- a/yeetube.el
+++ b/yeetube.el
@@ -100,6 +100,12 @@ Example Usage:
(define-key yeetube-mode-map (kbd "a") 'yeetube-change-download-audio-format)
yeetube-mode-map))
+(defun yeetube-check-if-youtube (url)
+ "Check if URL contain youtube."
+ (if (string-match-p "youtube" url)
+ t
+ nil))
+
(defun yeetube-play ()
"Open the url at point in an `'org-mode buffer using 'yeetube-player'."
(interactive)