diff options
author | Thanos Apollo <[email protected]> | 2023-07-05 10:34:59 +0300 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-07-05 18:14:01 +0300 |
commit | 980a73a228fdfe8a5b360ac5b9581fc30c19c6b2 (patch) | |
tree | 03ec5f2d8478000feaaf480920e7d2c5594da93e | |
parent | 264b9f14d90d6cdd7cf56c534d4f765642af381f (diff) |
Add support for localhost
Check if url contains localhost, then ask for port
-rw-r--r-- | yeetube.el | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -295,7 +295,10 @@ then run this command interactively." "Change yeetube-query-url." (interactive) (setq yeetube-query-url (read-string "URL: ")) - (unless (string-prefix-p "https://" yeetube-query-url) + (when (string-prefix-p "localhost" yeetube-query-url) + (setq port (read-string "Port: ")) + (setq yeetube-query-url (concat "http://localhost:" port))) + (unless (string-prefix-p "http://" yeetube-query-url) (setq yeetube-query-url (concat "https://" yeetube-query-url))) (when (string-suffix-p "/" yeetube-query-url) (setq yeetube-query-url (substring yeetube-query-url 0 -1)))) |