diff options
| author | RblSb <msrblsb@gmail.com> | 2021-01-24 13:12:58 +0300 |
|---|---|---|
| committer | RblSb <msrblsb@gmail.com> | 2021-01-24 13:12:58 +0300 |
| commit | 35beab11cdccf09dc77917a795b033314e62a5b1 (patch) | |
| tree | 23134d53f46ac678742f7fc4095b66dd68010617 /src/client/Main.hx | |
| parent | 3444b413ab12783c85ce73df9931142fea11b749 (diff) | |
Video title input
Diffstat (limited to 'src/client/Main.hx')
| -rw-r--r-- | src/client/Main.hx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/client/Main.hx b/src/client/Main.hx index 5c29d29..31558eb 100644 --- a/src/client/Main.hx +++ b/src/client/Main.hx @@ -146,6 +146,9 @@ class Main { addVideoUrl(true); return false; }); + ge("#mediatitle").onkeydown = (e:KeyboardEvent) -> { + if (e.keyCode == KeyCode.Return) addVideoUrl(true); + } ge("#ce_queue_next").onclick = e -> addIframe(false); ge("#ce_queue_end").onclick = e -> addIframe(true); @@ -210,6 +213,16 @@ class Main { addVideoArray(links, atEnd, isTemp); } + public function isRawPlayerLink(url:String):Bool { + return player.isRawPlayerLink(url); + } + + public function isSingleVideoLink(url:String):Bool { + if (~/, ?(https?)/g.match(url)) return false; + if (mask.match(url)) return false; + return true; + } + public function sortItemsForQueueNext<T>(items:Array<T>):Void { if (items.length == 0) return; // except first item when list empty |
