aboutsummaryrefslogtreecommitdiffstats
path: root/src/client/Buttons.hx
diff options
context:
space:
mode:
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