Hiding chromecast button from browsers that isnt chrome(ium)

This commit is contained in:
Kasper Rynning-Tønnesen
2017-01-25 21:43:44 +01:00
parent 885e9e15ed
commit 3f8c8380e4
3 changed files with 55 additions and 53 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -255,7 +255,9 @@ function init(){
$("#embed-button").css("display", "inline-block"); $("#embed-button").css("display", "inline-block");
$("#embed-area").val(embed_code(embed_autoplay, embed_width, embed_height, color)); $("#embed-area").val(embed_code(embed_autoplay, embed_width, embed_height, color));
$("#search").attr("placeholder", "Find song on YouTube..."); $("#search").attr("placeholder", "Find song on YouTube...");
if(!/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())){
$(".castButton").css("display", "none");
}
if(chromecastAvailable){ if(chromecastAvailable){
hide_native(1); hide_native(1);
} else if(chromecastReady) { } else if(chromecastReady) {