diff options
author | Thanos Apollo <[email protected]> | 2023-07-28 23:04:25 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-07-28 23:04:25 +0300 |
commit | a917ff4c223310a4c912add2428ed88d68cedbcc (patch) | |
tree | abb4e43a4d36cb5d0f5f5edd5b84dcd310e163e2 /yeetube.el | |
parent | 01f60dd97e157a4b2880dd910d95b25b1b0b0ecf (diff) |
Add yeetube-clear-history
Diffstat (limited to 'yeetube.el')
-rw-r--r-- | yeetube.el | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -138,8 +138,15 @@ It's recommended you keep it as the default value." (when (string-prefix-p "http" url) (call-process-shell-command (format "%s %s" yeetube-player url) nil 0) - (message "Opening with %s" yeetube-player))) - (yeetube--get-title)) + (message "Opening with %s" yeetube-player)) + (push url yeetube--history))) + +(defun yeetube-clear-history ( ) + "Clear yeetube history." + (interactive) + (let ((clear-history (y-or-n-p "Delete history?"))) + (when clear-history + (setq yeetube--history nil)))) (defun yeetube-toggle-video-mpv () "Toggle video on/off for mpv player." |