mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Open modal always when small player/iframed, close after 5 seconds
This commit is contained in:
@@ -207,13 +207,18 @@ var Channel = {
|
|||||||
|
|
||||||
|
|
||||||
if(!client) {
|
if(!client) {
|
||||||
if(!Helper.mobilecheck()) {
|
if(!Helper.mobilecheck() && !small_player) {
|
||||||
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, 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, 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()) {
|
||||||
|
setTimeout(function() {
|
||||||
|
M.Modal.getInstance(document.getElementById("channel-share-modal")).close();
|
||||||
|
}, 10000);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Helper.removeElement(".video-container");
|
Helper.removeElement(".video-container");
|
||||||
|
|||||||
Reference in New Issue
Block a user