From 81071b59445d702d14a80241f409fc282d509f1f Mon Sep 17 00:00:00 2001 From: RblSb Date: Wed, 4 Mar 2020 20:56:03 +0300 Subject: Template url --- src/Types.hx | 1 + src/client/Buttons.hx | 6 ++++++ src/client/Main.hx | 4 ++++ 3 files changed, 11 insertions(+) (limited to 'src') diff --git a/src/Types.hx b/src/Types.hx index e5b467a..06c85ea 100644 --- a/src/Types.hx +++ b/src/Types.hx @@ -14,6 +14,7 @@ typedef Config = { serverChatHistory:Int, totalVideoLimit:Int, userVideoLimit:Int, + templateUrl:String, leaderRequest:String, emotes:Array, filters:Array, diff --git a/src/client/Buttons.hx b/src/client/Buttons.hx index 318ba9a..e5c36a0 100644 --- a/src/client/Buttons.hx +++ b/src/client/Buttons.hx @@ -137,6 +137,12 @@ class Buttons { final showCustomEmbed = ge("#showcustomembed"); showCustomEmbed.onclick = e -> showPlayerGroup(showCustomEmbed); + ge("#insert_template").onclick = e -> { + final input:InputElement = cast ge("#mediaurl"); + input.value = main.getTemplateUrl(); + input.focus(); + } + window.onresize = onVideoResize; initSplit(); } diff --git a/src/client/Main.hx b/src/client/Main.hx index b2f51ca..8ec1704 100644 --- a/src/client/Main.hx +++ b/src/client/Main.hx @@ -646,6 +646,10 @@ class Main { onTimeGet.run = requestTime; } + public function getTemplateUrl():String { + return config.templateUrl; + } + function escapeRegExp(regex:String):String { return ~/([.*+?^${}()|[\]\\])/g.replace(regex, "\\$1"); } -- cgit v1.2.3