From 1fef8a983157d25894b898a230048b23fb558463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Sun, 23 Sep 2018 21:15:10 +0200 Subject: [PATCH] Added join-link for iframes --- server/public/assets/css/style.css | 15 +++++++++++++++ server/public/assets/js/channel.js | 1 + server/public/assets/js/functions.js | 4 ++++ 3 files changed, 20 insertions(+) diff --git a/server/public/assets/css/style.css b/server/public/assets/css/style.css index d3555903..b1d37cfb 100755 --- a/server/public/assets/css/style.css +++ b/server/public/assets/css/style.css @@ -517,6 +517,17 @@ li.disabled span { padding-right: 1px; } +.addedJoinBox { + position: absolute; + bottom: 50px; + z-index: 99; + left: 0px; + text-align: left; + background: #2d2d2d; + padding: 20px; + color: white; +} + #closePlayer{ position: fixed; top: 7px; @@ -2991,6 +3002,10 @@ nav ul li:hover, nav ul li.active { display: none !important; } + .addedJoinBox { + display: none; + } + #playbar{ display:block; position: fixed; diff --git a/server/public/assets/js/channel.js b/server/public/assets/js/channel.js index 5e35c665..29aca00a 100644 --- a/server/public/assets/js/channel.js +++ b/server/public/assets/js/channel.js @@ -3,6 +3,7 @@ var Channel = { if(window.location.hash == "#small" || inIframe()) { small_player = true; document.querySelector("footer").style.display = "none"; + addJoinBox(); } if(client) { Helper.addClass(".tabs", "hide"); diff --git a/server/public/assets/js/functions.js b/server/public/assets/js/functions.js index 018b2c70..2c242f4e 100644 --- a/server/public/assets/js/functions.js +++ b/server/public/assets/js/functions.js @@ -1235,6 +1235,10 @@ function before_toast(){ M.Toast.dismissAll(); } +function addJoinBox() { + document.querySelector("#video-container").insertAdjacentHTML("beforeend", '
Listen directly on https://zoff.me
'); +} + function scrollChat() { var current = document.querySelector(".chatTabs .active").getAttribute("href"); if(current == "#channelchat") {