Made the iframed less intrusive

This commit is contained in:
Kasper Rynning-Tønnesen
2018-09-25 20:25:15 +02:00
parent 7ced63c98d
commit ce3ed5f191

View File

@@ -3,8 +3,8 @@ var Channel = {
if(window.location.hash == "#small" || inIframe()) { if(window.location.hash == "#small" || inIframe()) {
small_player = true; small_player = true;
document.querySelector("footer").style.display = "none"; document.querySelector("footer").style.display = "none";
addJoinBox(); //addJoinBox();
hideAllExtra(); //hideAllExtra();
//document.querySelectorAll(".tab.col.s3")[1].remove(); //document.querySelectorAll(".tab.col.s3")[1].remove();
//document.querySelectorAll(".tab.col.s3")[1].remove(); //document.querySelectorAll(".tab.col.s3")[1].remove();
} }
@@ -211,19 +211,19 @@ var Channel = {
if(!client) { if(!client) {
if(!Helper.mobilecheck() && !small_player) { if(!Helper.mobilecheck()) {
var shareCodeUrl = window.location.protocol + "//client."+window.location.hostname+"/r/"+btoa(encodeURIComponent(chan.toLowerCase())); var shareCodeUrl = window.location.protocol + "//client."+window.location.hostname+"/r/"+btoa(encodeURIComponent(chan.toLowerCase()));
document.getElementById("share-join-qr").setAttribute("src", "https://chart.googleapis.com/chart?chs=221x221&cht=qr&choe=UTF-8&chld=L|1&chl="+shareCodeUrl); 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())); Helper.setHtml("#channel-name-join", "client." + window.location.hostname + "/" + encodeURIComponent(chan.toLowerCase()));
} else if(small_player) { } /*else if(small_player) {
document.querySelector("#channel-share-modal .modal-content").innerHTML = "<p>To listen to this channel with more features, go to</p><p>https://zoff.me/" + encodeURIComponent(chan.toLowerCase()) + "</p><img src='/assets/images/favicon.png' height='100' width='100' alt='circle-logo-zoff'>"; document.querySelector("#channel-share-modal .modal-content").innerHTML = "<p>To listen to this channel with more features, go to</p><p>https://zoff.me/" + encodeURIComponent(chan.toLowerCase()) + "</p><img src='/assets/images/favicon.png' height='100' width='100' alt='circle-logo-zoff'>";
M.Modal.getInstance(document.getElementById("channel-share-modal")).open(); //M.Modal.getInstance(document.getElementById("channel-share-modal")).open();
if(!Helper.mobilecheck()) { if(!Helper.mobilecheck()) {
setTimeout(function() { setTimeout(function() {
M.Modal.getInstance(document.getElementById("channel-share-modal")).close(); M.Modal.getInstance(document.getElementById("channel-share-modal")).close();
}, 10000); }, 10000);
} }
} }*/
} else { } else {
Helper.removeElement(".video-container"); Helper.removeElement(".video-container");
Helper.removeElement(".offline-panel"); Helper.removeElement(".offline-panel");