From e92d4ed61a45eae336b462e0d5e346951f37b4e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Mon, 24 Sep 2018 00:09:05 +0200 Subject: [PATCH] Removing some functions from iframed-player --- server/public/assets/js/channel.js | 5 ++++- server/public/assets/js/functions.js | 11 +++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/server/public/assets/js/channel.js b/server/public/assets/js/channel.js index 4444c2de..2a1bb59f 100644 --- a/server/public/assets/js/channel.js +++ b/server/public/assets/js/channel.js @@ -4,6 +4,9 @@ var Channel = { small_player = true; document.querySelector("footer").style.display = "none"; addJoinBox(); + hideAllExtra(); + document.querySelectorAll(".tab.col.s3")[1].remove(); + document.querySelectorAll(".tab.col.s3")[1].remove(); } if(client) { Helper.addClass(".tabs", "hide"); @@ -212,7 +215,7 @@ var Channel = { document.getElementById("share-join-qr").setAttribute("src", "https://chart.googleapis.com/chart?chs=221x221&cht=qr&choe=UTF-8&chld=L|1&chl="+shareCodeUrl); Helper.setHtml("#channel-name-join", "client." + window.location.hostname + "/" + encodeURIComponent(chan.toLowerCase())); } else if(small_player) { - document.querySelector("#channel-share-modal .modal-content").innerHTML = "

To listen to this channel, go to

https://zoff.me/" + encodeURIComponent(chan.toLowerCase()) + "

circle-logo-zoff"; + document.querySelector("#channel-share-modal .modal-content").innerHTML = "

To listen to this channel with more features, go to

https://zoff.me/" + encodeURIComponent(chan.toLowerCase()) + "

circle-logo-zoff"; M.Modal.getInstance(document.getElementById("channel-share-modal")).open(); if(!Helper.mobilecheck()) { setTimeout(function() { diff --git a/server/public/assets/js/functions.js b/server/public/assets/js/functions.js index 2c242f4e..73a06a6c 100644 --- a/server/public/assets/js/functions.js +++ b/server/public/assets/js/functions.js @@ -1248,6 +1248,17 @@ function scrollChat() { } } +function hideAllExtra() { + document.querySelector(".settings-collapsible").children[0].style.display = "none"; + document.querySelector(".settings-collapsible").children[2].style.display = "none"; + document.querySelector(".settings-collapsible").children[3].style.display = "none"; + document.querySelector(".settings-collapsible").children[4].style.display = "none"; + document.querySelector(".settings-collapsible").children[5].style.display = "none"; + document.querySelector(".settings-collapsible").children[6].style.display = "none"; + document.querySelector(".settings-collapsible").children[7].style.display = "none"; + +} + function searchTimeout(event) { search_input = document.getElementsByClassName("search_input")[0].value;