From 8e714c838fe03f35e85a8435e799ce2f4f43b38e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Sun, 23 Sep 2018 13:12:50 +0200 Subject: [PATCH] Fixed issue with embed-code generating faulty --- server/public/assets/js/channel.js | 2 +- server/public/assets/js/functions.js | 25 +++---------------------- 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/server/public/assets/js/channel.js b/server/public/assets/js/channel.js index 5b4e6f21..5e35c665 100644 --- a/server/public/assets/js/channel.js +++ b/server/public/assets/js/channel.js @@ -337,7 +337,7 @@ var Channel = { if(!client) { Helper.addClass("footer", "padding-bottom-novideo"); - document.getElementById("embed-area").value = embed_code(embed_autoplay, embed_width, embed_height, color); + document.getElementById("embed-area").value = embed_code(embed_autoplay, embed_width, embed_height, color, embed_videoonly, embed_localmode); } if(!/chrom(e|ium)/.test(navigator.userAgent.toLowerCase()) && !Helper.mobilecheck() && !client){ diff --git a/server/public/assets/js/functions.js b/server/public/assets/js/functions.js index ec580b70..018b2c70 100644 --- a/server/public/assets/js/functions.js +++ b/server/public/assets/js/functions.js @@ -765,10 +765,10 @@ function disable_debug(){ } catch(e){} } -function embed_code(autoplay, width, height, color, embed_code, embed_local){ +function embed_code(autoplay, width, height, color, embed_videoonly, embed_localmode){ var autoplay_add = ""; if(autoplay == "&autoplay") autoplay_add = 'allow="autoplay"'; - return ''; + return ''; } function change_offline(enabled, already_offline){ @@ -1232,26 +1232,7 @@ function emit() { } function before_toast(){ - /*if($('.toast').length > 0) { - var toastElement = $('.toast').first()[0]; - var toastInstance = toastElement.M_Toast; - toastInstance.remove(); -}*/ -/*var toasts = document.querySelector(".toast"); -//for(var i = 0; i < toasts.length; i++) { -// var instance = M.Toast.getInstance(toasts[i]); -if(toasts == null) return; -var instance = M.Toast.getInstance(toasts); -try { -console.log(instance); -if(instance.timeRemaining > 0) { -instance.dismiss(); -} -} catch(e) { -} -//}*/ -M.Toast.dismissAll(); -//Materialize.Toast.removeAll(); + M.Toast.dismissAll(); } function scrollChat() {