aboutsummaryrefslogtreecommitdiffstats
path: root/src/client/Buttons.hx
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2021-02-14 06:46:05 +0300
committerRblSb <msrblsb@gmail.com>2021-02-14 06:46:05 +0300
commit600156045aa6f93c79fd57ee4e76d588b3f734e6 (patch)
tree85f1910e202091a2c446e21a4f938214c66b311c /src/client/Buttons.hx
parent5b4d9c6257f7563ef685ab383037906355fbf054 (diff)
Subtitles url input
Can be enabled by plugins
Diffstat (limited to 'src/client/Buttons.hx')
-rw-r--r--src/client/Buttons.hx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/Buttons.hx b/src/client/Buttons.hx
index 538aaa0..8ed259a 100644
--- a/src/client/Buttons.hx
+++ b/src/client/Buttons.hx
@@ -154,10 +154,10 @@ class Buttons {
final mediaUrl:InputElement = cast ge("#mediaurl");
mediaUrl.oninput = () -> {
final value = mediaUrl.value;
- if (value != "" && main.isRawPlayerLink(value) && main.isSingleVideoLink(value)) {
- ge("#mediatitleblock").style.display = "";
- } else {
- ge("#mediatitleblock").style.display = "none";
+ final isRawSingleVideo = value != "" && main.isRawPlayerLink(value) && main.isSingleVideoLink(value);
+ ge("#mediatitleblock").style.display = isRawSingleVideo ? "" : "none";
+ if (JsApi.hasSubtitleSupport()) {
+ ge("#subsurlblock").style.display = isRawSingleVideo ? "" : "none";
}
}
mediaUrl.onfocus = mediaUrl.oninput;
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage