summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--yeetube.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/yeetube.el b/yeetube.el
index 5059ab8..971ab44 100644
--- a/yeetube.el
+++ b/yeetube.el
@@ -145,12 +145,13 @@ It's recommended you keep it as the default value."
(message "Opening with %s" yeetube-player))
(push url yeetube--history)))
-(defun yeetube-clear-history ( )
- "Clear yeetube history."
+(defun yeetube-save-video ()
+ "Save url at point."
(interactive)
- (let ((clear-history (y-or-n-p "Delete history?")))
- (when clear-history
- (setq yeetube--history nil))))
+ (let ((name (read-string "Save as: "))
+ (url (org-element-property
+ :raw-link (org-element-context))))
+ (push (cons name url) yeetube-saved-videos)))
(defun yeetube-toggle-video-mpv ()
"Toggle video on/off for mpv player."