diff --git a/server/handlers/notifications.js b/server/handlers/notifications.js index 171cc2ba..aa2923e6 100644 --- a/server/handlers/notifications.js +++ b/server/handlers/notifications.js @@ -15,7 +15,7 @@ function requested_change(type, string, channel) { var message = "A " + type + " change was requested on " + channel + "

New supposed value is:

" + string + "


\ Go to https://admin.zoff.me/ to accept or decline the request."; var msg = { - from: notify_mail.from, + from: mailconfig.from, to: mailconfig.notify_mail, subject: 'ZOFF: Requested new ' + type, text: message, diff --git a/server/handlers/suggestions.js b/server/handlers/suggestions.js index b828e3a1..932edd24 100644 --- a/server/handlers/suggestions.js +++ b/server/handlers/suggestions.js @@ -35,7 +35,7 @@ function thumbnail(msg, coll, guid, offline, socket) { msg.thumbnail = msg.thumbnail.replace(/^https?\:\/\//i, ""); if(msg.thumbnail.substring(0,2) != "//") msg.thumbnail = "//" + msg.thumbnail; var channel = msg.channel.toLowerCase(); - var hash = Functions.hash_pass(Functions.decrypt_string(msg.adminpass)); + var hash = Functions.hash_pass(Functions.hash_pass(Functions.decrypt_string(msg.adminpass),true)); db.collection(channel + "_settings").find({id: "config"}, function(err, docs){ if(docs.length > 0 && (docs[0].userpass == undefined || docs[0].userpass == "" || (msg.hasOwnProperty('pass') && docs[0].userpass == crypto.createHash('sha256').update(Functions.decrypt_string(msg.pass)).digest("base64")))) { if(docs !== null && docs.length !== 0 && docs[0].adminpass !== "" && docs[0].adminpass == hash){ @@ -87,7 +87,7 @@ function description(msg, coll, guid, offline, socket) { msg.adminpass = adminpass; } var channel = msg.channel.toLowerCase(); - var hash = Functions.hash_pass(Functions.decrypt_string(msg.adminpass)); + var hash = Functions.hash_pass(Functions.hash_pass(Functions.decrypt_string(msg.adminpass), true)); db.collection(channel + "_settings").find({id: "config"}, function(err, docs){ if(docs.length > 0 && (docs[0].userpass == undefined || docs[0].userpass == "" || (msg.hasOwnProperty('pass') && docs[0].userpass == crypto.createHash('sha256').update(Functions.decrypt_string(msg.pass)).digest("base64")))) { if(docs !== null && docs.length !== 0 && docs[0].adminpass !== "" && docs[0].adminpass == hash){ diff --git a/server/public/assets/css/style.css b/server/public/assets/css/style.css index ae61e041..4d474efa 100755 --- a/server/public/assets/css/style.css +++ b/server/public/assets/css/style.css @@ -21,6 +21,10 @@ body { background: white; } +a { + outline: 0 !important; +} + .error-code-container { background: lightgrey; border: 1px solid darkgrey; @@ -513,6 +517,10 @@ li.disabled span { align-items: center; } +.select-wrapper input.select-dropdown { + position: initial; +} + #frontpage_player{ position: fixed; bottom: 10px; @@ -592,6 +600,7 @@ footer{ } .modal { + outline: 0 !important; z-index: 999999999 !important; } @@ -631,14 +640,15 @@ footer{ margin-right:10px; } -.side-nav{ +.sidenav{ overflow-x:hidden; + width: 315px; } footer.page-footer, nav, .tabs .tab a, -.side-nav .collapsible-body li.active, -.side-nav.fixed .collapsible-body li.active, +.sidenav .collapsible-body li.active, +.sidenav.fixed .collapsible-body li.active, .pagination li.active{ background-color: #2D2D2D; } @@ -860,7 +870,7 @@ nav .zbrand{ } #description_form div .character-counter{ - margin-top: -30px; + /*margin-top: -30px;*/ color:black; } @@ -1214,12 +1224,13 @@ margin:-1px; } .video-container{ + padding-left: 0px !important; -webkit-transition: opacity 0.5s; -moz-transition: opacity 0.5s; -o-transition: opacity 0.5s; transition: opacity 0.5s; overflow: visible; - padding-right: 0px; + /*padding-right: 0px !important;*/ } .no-opacity{ @@ -1258,8 +1269,16 @@ margin:-1px; #chan_thumbnail, #chan_description{ color: black; width: 100%; + border-bottom: 1px solid transparent; + -webkit-box-shadow: 0 1px 0 0 transparent; + box-shadow: 0 1px 0 0 transparent; } +#chan_thumbnail:focus, #chan_description:focus { + border-bottom: 1px solid orange !important; + -webkit-box-shadow: 0 1px 0 0 orange !important; + box-shadow: 0 1px 0 0 orange !important; +} #thumbnail_image_channel{ max-width: 200px; max-height: 400px; @@ -1269,7 +1288,7 @@ margin:-1px; position:absolute; width:100% !important; margin-left: 0px !important; - top: 57px; + /*top: 57px;*/ } .card-title{ @@ -3164,7 +3183,7 @@ nav ul li:hover, nav ul li.active { } .padding-bottom-novideo{ - padding-bottom:40px; + padding-bottom:80px; } .padding-bottom-extra{ @@ -3178,7 +3197,7 @@ nav ul li:hover, nav ul li.active { } #playlist { - margin-left: 10px; + /*margin-left: 10px;*/ width: calc(100% - 10px); overflow: hidden; } @@ -3273,7 +3292,7 @@ nav ul li:hover, nav ul li.active { #results{ background-color: #000; - margin-top:56px; + margin-top:47px; } .result{ margin: 0; @@ -3314,7 +3333,7 @@ nav ul li:hover, nav ul li.active { .result-object-slid { /*-webkit-transform: translateX(calc(-100% + 45px)) !important; transform: translateX(calc(-100% + 45px)) !important;*/ - margin-left: -99%; + margin-left: -94%; } .result-start-end-container { diff --git a/server/public/assets/js/admin.js b/server/public/assets/js/admin.js index 8c09bab5..40aee65e 100755 --- a/server/public/assets/js/admin.js +++ b/server/public/assets/js/admin.js @@ -16,6 +16,13 @@ var Admin = { if($(".suggested-badge").text() != "0" && $(".suggested-badge").text() != "") { $(".suggested-badge").removeClass("hide"); } + if(!Helper.mobilecheck()) { + $('#chan_thumbnail').tooltip({ + delay: 5, + position: "left", + html: "imgur link" + }); + } } else { Admin.hideUserSuggested(); } @@ -35,7 +42,7 @@ var Admin = { $('#admin-lock').tooltip({ delay: 5, position: "left", - tooltip: "Logout" + html: "Logout" }); } $("#password").val(""); @@ -53,7 +60,7 @@ var Admin = { $('#admin-lock').tooltip({ delay: 5, position: "left", - tooltip: "Logout" + html: "Logout" }); } } @@ -98,10 +105,10 @@ var Admin = { //Crypt.remove_pass(chan.toLowerCase()); if(Admin.logged_in) { socket.emit("logout"); - Materialize.toast("Logged out", 4000); + M.toast({html: "Logged out", displayLength: 4000}); Admin.display_logged_out(); } else { - Materialize.toast("Not logged in", 4000); + M.toast({html: "Not logged in", displayLength: 4000}); } }, @@ -119,11 +126,12 @@ var Admin = { } if($("#admin-lock").html() != "lock") { + if(!Helper.mobilecheck()) { + $('#admin-lock').tooltip("destroy"); + //$('#admin-lock').tooltip('destroy'); + } $("#admin-lock").removeClass("clickable"); $("#admin-lock").html("lock"); - if(!Helper.mobilecheck()) { - $('#admin-lock').tooltip('remove'); - } } if(!$(".user-password-li").hasClass("hide")) { @@ -225,7 +233,7 @@ var Admin = { }, hide_settings: function() { - $('#settings').sideNav('hide'); + $('.sidenav').sidenav('close'); }, shuffle: function() { diff --git a/server/public/assets/js/channel.js b/server/public/assets/js/channel.js index 31b82239..0c42f3fd 100644 --- a/server/public/assets/js/channel.js +++ b/server/public/assets/js/channel.js @@ -10,7 +10,7 @@ var Channel = { $(".skip_next_client").tooltip({ delay: 5, position: "bottom", - tooltip: "Skip" + html: "Skip" }); } $("#results").addClass("client-results-height"); @@ -48,11 +48,11 @@ var Channel = { $('ul.playlist-tabs-loggedIn').tabs(); $('ul.chatTabs').tabs(); } - $("#settings").sideNav({ + $(".sidenav").sidenav({ menuWidth: 310, edge: side, closeOnClick: false, - onOpen: function(el) { + onOpenStart: function(el) { if(!$(".hamburger-sidenav").hasClass("open")) { $(".hamburger-sidenav").addClass("open"); } @@ -62,7 +62,7 @@ var Channel = { } }); }, - onClose: function(el) { + onCloseStart: function(el) { $(".hamburger-sidenav").removeClass("open"); $('*[id*=sidenav-overlay]:visible').each(function(i) { if(i > 0) { @@ -168,6 +168,7 @@ var Channel = { } if(((!localStorage.getItem("_jSeen") || localStorage.getItem("_jSeen") != "seen") && !Helper.mobilecheck()) && !client) { + $('.tap-target-join').tapTarget(); $('.tap-target-join').tapTarget('open'); tap_target_timeout = setTimeout(function() { $('.tap-target-join').tapTarget('close'); @@ -179,38 +180,38 @@ var Channel = { $("#chan").tooltip({ delay: 5, position: "bottom", - tooltip: "Show join URL", + html: "Show join URL", }); $("#viewers").tooltip({ delay: 5, position: "top", - tooltip: "Viewers" + html: "Viewers" }); $("#fullscreen").tooltip({ delay: 5, position: "top", - tooltip: "Fullscreen" + html: "Fullscreen" }); - $("#search-btn").tooltip({ + $(".search-btn-container").tooltip({ delay: 5, position: "bottom", - tooltip: "Search" + html: "Search" }); - $("#shuffle").tooltip({ + $(".shuffle-btn-container").tooltip({ delay: 5, position: "bottom", - tooltip: "Shuffle", + html: "Shuffle", }); $("#settings").tooltip({ delay: 5, position: "bottom", - tooltip: "Settings", + html: "Settings", }); } @@ -253,7 +254,7 @@ var Channel = { $('.castButton').tooltip({ delay: 5, position: "top", - tooltip: "Cast Zoff to TV" + html: "Cast Zoff to TV" }); $("#color_embed").spectrum({ @@ -487,6 +488,7 @@ var Channel = { var host = window.location.hostname.split("."); window.location.hostname = host[host.length -1]; }*/ + //Admin.display_logged_out(); var channel_before_move = chan.toLowerCase(); clearTimeout(timed_remove_check); changing_to_frontpage = true; @@ -502,29 +504,36 @@ var Channel = { window.scrollTo(0, 0); Player.stopInterval = true; - Admin.display_logged_out(); Admin.beginning = true; began = false; durationBegun = false; $("#embed-button").css("display", "none"); if(!Helper.mobilecheck()) { - $("#chan").tooltip("remove"); - $('.castButton').tooltip("remove"); - $("#viewers").tooltip("remove"); - //$('.castButton-unactive').tooltip("remove"); - $("#offline-mode").tooltip("remove"); - $('#chan_thumbnail').tooltip("remove"); - $('#fullscreen').tooltip("remove"); - $('#admin-lock').tooltip("remove"); - $("#search-btn").tooltip("remove"); - $("#shuffle").tooltip("remove"); - $("#settings").tooltip("remove"); + $("#chan").tooltip("destroy"); + $('.castButton').tooltip("destroy"); + $("#viewers").tooltip("destroy"); + //$('.castButton-unactive').tooltip("destroy"); + $("#offline-mode").tooltip("destroy"); + if(M.Tooltip.getInstance($("#chan_thumbnail")) != undefined) { + $('#chan_thumbnail').tooltip("destroy"); + } + $('#fullscreen').tooltip("destroy"); + if(M.Tooltip.getInstance($("#admin-lock")) != undefined) { + $('#admin-lock').tooltip("destroy"); + } + $(".search-btn-container").tooltip("destroy"); + $(".shuffle-btn-container").tooltip("destroy"); + $("#settings").tooltip("destroy"); } $("#seekToDuration").remove(); - $("#settings").sideNav("destroy"); - $('.tap-target').tapTarget('close'); - $('.tap-target-join').tapTarget('close'); + $(".sidenav").sidenav("destroy"); + if(M.TapTarget.getInstance($(".tap-target"))) { + $('.tap-target').tapTarget('close'); + } + if(M.TapTarget.getInstance($(".tap-target-join"))) { + $('.tap-target-join').tapTarget('close'); + } clearTimeout(tap_target_timeout); before_toast(); if(Helper.mobilecheck() || user_auth_avoid || client) { diff --git a/server/public/assets/js/embed.js b/server/public/assets/js/embed.js index f2ab1cd9..b53c44f9 100755 --- a/server/public/assets/js/embed.js +++ b/server/public/assets/js/embed.js @@ -201,7 +201,7 @@ function toast(msg) { $("#thumbnail_form").css("display", "none"); $("#description_form").css("display", "none"); if(!Helper.mobilecheck()) { - $('#chan_thumbnail').tooltip("remove"); + $('#chan_thumbnail').tooltip("destroy"); } w_p = true; break; @@ -248,7 +248,7 @@ function toast(msg) { $("#thumbnail_form").css("display", "none"); $("#description_form").css("display", "none"); if(!Helper.mobilecheck()) { - $('#chan_thumbnail').tooltip("remove"); + $('#chan_thumbnail').tooltip("destroy"); } w_p = true; if(!$("#playlist_loader").hasClass("hide")) { @@ -296,7 +296,7 @@ function toast(msg) { $('#chan_thumbnail').tooltip({ delay: 5, position: "left", - tooltip: "imgur link" + html: "imgur link" }); } break; @@ -314,7 +314,7 @@ function toast(msg) { break; } before_toast(); - Materialize.toast(msg, 4000); + M.toast({html: msg, displayLength: 4000}); } function emit() { @@ -332,11 +332,12 @@ function emit() { } function before_toast(){ - if($('.toast').length > 0) { + /*if($('.toast').length > 0) { var toastElement = $('.toast').first()[0]; var toastInstance = toastElement.M_Toast; toastInstance.remove(); - } + }*/ + M.Toast.dismissAll(); //Materialize.Toast.removeAll(); } diff --git a/server/public/assets/js/frontpage.js b/server/public/assets/js/frontpage.js index 2e95b311..86aa40f0 100755 --- a/server/public/assets/js/frontpage.js +++ b/server/public/assets/js/frontpage.js @@ -1,5 +1,3 @@ -//script for frontpage - var channel_list; var frontpage = true; var socket; @@ -131,7 +129,7 @@ var Frontpage = { $($(".pin").parent().parent().parent()).tooltip({ delay: 5, position: "top", - tooltip: "Featured playlist" + html: "Featured playlist" }); } @@ -268,7 +266,7 @@ var Frontpage = { Frontpage.frontpage_function(response.results); }, error: function() { - Materialize.toast("Couldn't fetch lists, trying again in 3 seconds..", 3000, "red lighten connect_error"); + M.toast({html: "Couldn't fetch lists, trying again in 3 seconds..", displayLength: 3000, classes: "red lighten connect_error"}); retry_frontpage = setTimeout(function(){ Frontpage.get_frontpage_lists(); }, 3000); @@ -319,12 +317,12 @@ var Frontpage = { } $("#main-container").css("background-color", "#2d2d2d"); if(!Helper.mobilecheck()) { - $("#frontpage-viewer-counter").tooltip("remove"); - $(".generate-channel-name").tooltip("remove"); - $("#offline-mode").tooltip("remove"); - $("#client-mode-button").tooltip("remove"); + $("#frontpage-viewer-counter").tooltip("destroy"); + $(".generate-channel-name").tooltip("destroy"); + $("#offline-mode").tooltip("destroy"); + $("#client-mode-button").tooltip("destroy"); if($(".pin").length == 1) { - $($(".pin").parent().parent().parent()).tooltip("remove"); + $($(".pin").parent().parent().parent()).tooltip("destroy"); } } currently_showing_channels = 1; @@ -355,7 +353,7 @@ var Frontpage = { var response = $("
" + e + "
"); - $('select').material_select('destroy'); + $('select').formSelect('destroy'); $(".mega").remove(); $(".mobile-search").remove(); $("main").attr("class", "container center-align main"); @@ -439,7 +437,7 @@ var Frontpage = { $("#about").modal(); $("#help").modal(); $("#contact").modal(); - $('select').material_select(); + $('select').formSelect(); Helper.log([ "Sending frontpage_lists", @@ -454,7 +452,7 @@ var Frontpage = { $("#offline-mode").tooltip({ delay: 5, position: "bottom", - tooltip: "Enable local mode" + html: "Enable local mode" }); } } @@ -462,17 +460,17 @@ var Frontpage = { $("#frontpage-viewer-counter").tooltip({ delay: 5, position: "bottom", - tooltip: "Total Viewers" + html: "Total Viewers" }); $("#client-mode-button").tooltip({ delay: 5, position: "bottom", - tooltip: "Client mode" + html: "Client mode" }); $(".generate-channel-name").tooltip({ delay: 5, position: "bottom", - tooltip: "Generate name" + html: "Generate name" }); } Frontpage.get_frontpage_lists(); @@ -487,7 +485,7 @@ var Frontpage = { if(!localStorage.ok_cookie){ before_toast(); - Materialize.toast("We're using cookies to enhance your experience! ok", 10000); + M.toast({html: "We're using cookies to enhance your experience! ok", displayLength: 10000}); } var pad = 0; diff --git a/server/public/assets/js/functions.js b/server/public/assets/js/functions.js index e622b820..64edfa65 100644 --- a/server/public/assets/js/functions.js +++ b/server/public/assets/js/functions.js @@ -47,7 +47,7 @@ function hide_native(way) { $('.castButton').tooltip({ delay: 5, position: "top", - tooltip: "Stop casting" + html: "Stop casting" }); } $("#duration").toggleClass("hide"); @@ -93,7 +93,7 @@ function hide_native(way) { $('.castButton').tooltip({ delay: 5, position: "top", - tooltip: "Cast Zoff to TV" + html: "Cast Zoff to TV" }); } $('.castButton').removeClass('castButton-white-active'); @@ -161,7 +161,7 @@ function start_auth() { $("#user-pass-input").focus(); //Crypt.remove_userpass(chan.toLowerCase()); before_toast(); - Materialize.toast("That is not the correct password, try again..", 4000); + M.toast({html: "That is not the correct password, try again..", displayLength: 4000}); } } @@ -392,7 +392,7 @@ function setup_no_connection_listener(){ Helper.log(['Connection Failed']); if(!connect_error){ connect_error = true; - Materialize.toast("Error connecting to server, please wait..", 100000000, "red lighten connect_error"); + M.toast({html: "Error connecting to server, please wait..", displayLength: 100000000, classes: "red lighten connect_error"}); } }); @@ -400,7 +400,7 @@ function setup_no_connection_listener(){ Helper.log(["Connection Failed."]); if(!connect_error){ connect_error = true; - Materialize.toast("Error connecting to server, please wait..", 100000000, "red lighten connect_error"); + M.toast({html: "Error connecting to server, please wait..", displayLength: 100000000, classes: "red lighten connect_error"}); } }); } @@ -535,7 +535,7 @@ function change_offline(enabled, already_offline){ $("#offline-mode").tooltip({ delay: 5, position: "bottom", - tooltip: "Disable local mode" + html: "Disable local mode" }); } @@ -597,7 +597,7 @@ function change_offline(enabled, already_offline){ $("#offline-mode").tooltip({ delay: 5, position: "bottom", - tooltip: "Enable local mode" + html: "Enable local mode" }); } @@ -658,7 +658,7 @@ function toast(msg) { case "addedplaylist": if(embed) return; if(Search.submitYouTubeError) { - Materialize.toast("Added most of your playlist, but something was wrong. Check the playlist..", 4000, "red lighten connect_error"); + M.toast({html: "Added most of your playlist, but something was wrong. Check the playlist..", displayLength: 4000, classes: "red lighten connect_error"}); Search.submitYouTubeError = false; return; } @@ -679,7 +679,7 @@ function toast(msg) { $("#thumbnail_form").css("display", "none"); $("#description_form").css("display", "none"); if(!Helper.mobilecheck()) { - $('#chan_thumbnail').tooltip("remove"); + $('#chan_thumbnail').tooltip("destroy"); } w_p = true; break; @@ -728,7 +728,7 @@ function toast(msg) { $("#thumbnail_form").css("display", "none"); $("#description_form").css("display", "none"); if(!Helper.mobilecheck()) { - $('#chan_thumbnail').tooltip("remove"); + $('#chan_thumbnail').tooltip("destroy"); } w_p = true; if(!$("#playlist_loader").hasClass("hide")) { @@ -772,13 +772,6 @@ function toast(msg) { msg="Correct password. You now have access to the sacred realm of The Admin."; $("#thumbnail_form").css("display", "inline-block"); $("#description_form").css("display", "inline-block"); - if(!Helper.mobilecheck()) { - $('#chan_thumbnail').tooltip({ - delay: 5, - position: "left", - tooltip: "imgur link" - }); - } break; case "changedpass": if(embed) return; @@ -794,7 +787,7 @@ function toast(msg) { break; } before_toast(); - Materialize.toast(msg, 4000); + M.toast({ html: msg, displayLength: 4000}); } function emit() { @@ -812,11 +805,12 @@ function emit() { } function before_toast(){ - if($('.toast').length > 0) { + /*if($('.toast').length > 0) { var toastElement = $('.toast').first()[0]; var toastInstance = toastElement.M_Toast; toastInstance.remove(); - } + }*/ + M.Toast.dismissAll(); //Materialize.Toast.removeAll(); } diff --git a/server/public/assets/js/listeners.js b/server/public/assets/js/listeners.js index 0ebd1a76..7c751a4a 100755 --- a/server/public/assets/js/listeners.js +++ b/server/public/assets/js/listeners.js @@ -148,7 +148,7 @@ window.zoff = { disable_debug: disable_debug } -if(!Helper.mobilecheck()) { +if(!Helper.mobilecheck() && window.location.host != "localhost") { window.onerror = function(e, source, lineno, colno, error) { if(e == "Script error.") return true; Helper.logs.unshift({log: e.toString().replace(/(\r\n|\n|\r)/gm,""), date: new Date(), lineno: lineno, colno: colno, source:source}); @@ -202,7 +202,7 @@ $().ready(function(){ }*/ $(".connect_error").fadeOut(function(){ $(".connect_error").remove(); - Materialize.toast("Connected!", 2000, "green lighten"); + M.toast({ html: "Connected!", displayLength: 2000, classes: "green lighten"}); }); } Chat.namechange("", true, true); @@ -318,6 +318,7 @@ initializeCastApi = function() { if((!localStorage.getItem("_chSeen") || localStorage.getItem("_chSeen") != "seen") && !client) { $(".castButton").css("display", "block"); showDiscovery = true; + $('.tap-target').tapTarget(); $('.tap-target').tapTarget('open'); tap_target_timeout = setTimeout(function() { $('.tap-target').tapTarget('close'); @@ -349,9 +350,9 @@ $(document).on("click", "#bitcoin-address", function(e) { copyTextarea.select(); var successful = document.execCommand('copy'); if(successful) { - Materialize.toast("Copied!", 2000, "green lighten"); + M.toast({html: "Copied!", displayLength: 2000, classes: "green lighten"}); } else { - Materialize.toast("Error copying..", 2000, "red lighten"); + M.toast({html: "Error copying..", displayLength: 2000, classes: "red lighten"}); } }); @@ -360,9 +361,9 @@ $(document).on("click", "#ethereum-address", function(e) { copyTextarea.select(); var successful = document.execCommand('copy'); if(successful) { - Materialize.toast("Copied!", 2000, "green lighten"); + M.toast({html: "Copied!", displayLength: 2000, classes: "green lighten"}); } else { - Materialize.toast("Error copying..", 2000, "red lighten"); + M.toast({html: "Error copying..",displayLength: 2000, classes: "red lighten"}); } }); @@ -375,6 +376,15 @@ $(document).on("click", ".pagination-results a", function(e) { Search.search(searchInput, false, false, pageToken); }); +$(document).on("click", "#settings", function(e) { + e.preventDefault(); + if(!M.Sidenav.getInstance($(".sidenav")).isOpen) { + $(".sidenav").sidenav("open"); + } else { + $(".sidenav").sidenav("close"); + } +}); + $(document).on("click", ".accept-delete", function(e) { e.preventDefault(); emit("delete_all", {channel: chan.toLowerCase()}); @@ -535,9 +545,9 @@ $(document).on("click", ".copy-context-menu", function(e) { copyTextarea.select(); var successful = document.execCommand('copy'); if(successful) { - Materialize.toast("Copied!", 2000, "green lighten"); + M.toast({html: "Copied!", displayLength: 2000, classes: "green lighten"}); } else { - Materialize.toast("Error copying..", 2000, "red lighten"); + M.toast({html: "Error copying..", displayLength: 2000, classes: "red lighten"}); } $(".copy_video_id").css("display", "none"); } @@ -676,12 +686,12 @@ $(document).on("click", ".close-user-password", function() { Player.stopInterval = true; user_auth_avoid = true; if(!Helper.mobilecheck()) { - $('.castButton').tooltip("remove"); - $("#viewers").tooltip("remove"); - //$('.castButton-unactive').tooltip("remove"); - $("#offline-mode").tooltip("remove"); - $('#chan_thumbnail').tooltip("remove"); - $('#admin-lock').tooltip("remove"); + $('.castButton').tooltip("destroy"); + $("#viewers").tooltip("destroy"); + //$('.castButton-unactive').tooltip("destroy"); + $("#offline-mode").tooltip("destroy"); + $('#chan_thumbnail').tooltip("destroy"); + $('#admin-lock').tooltip("destroy"); } window.history.pushState("to the frontpage!", "Title", "/"); Channel.onepage_load(); @@ -873,7 +883,7 @@ $(document).on("submit", "#listImport", function(e){ ga('send', 'event', "import", "youtube"); } else { before_toast(); - Materialize.toast("It seems you've entered a invalid url.", 4000); + M.toast({html: "It seems you've entered a invalid url.", displayLength: 4000}); } document.getElementById("import").value = ""; }); @@ -882,7 +892,7 @@ $(document).on("submit", "#listImportZoff", function(e) { e.preventDefault(); var new_channel = $("#import_zoff").val(); if(new_channel == "") { - Materialize.toast("It seems you've entered a invalid channel-name.", 4000); + M.toast({html: "It seems you've entered a invalid channel-name.", displayLength: 4000}); return; } socket.emit("import_zoff", {channel: chan.toLowerCase(), new_channel: new_channel.toLowerCase()}); @@ -913,7 +923,7 @@ $(document).on("submit", "#listImportSpotify", function(e){ Search.importSpotifyPlaylist('https://api.spotify.com/v1/users/' + user + '/playlists/' + playlist_id + '/tracks'); } else { before_toast(); - Materialize.toast("It seems you've entered a invalid url.", 4000); + M.toast({html: "It seems you've entered a invalid url.", displayLength: 4000}); } } document.getElementById("import_spotify").value = ""; @@ -1104,7 +1114,7 @@ $(document).on("click", "#shuffle", function(e) $(document).on("click", "#search-btn", function(e) { - e.preventDefault(); + //e.preventDefault(); Search.showSearch(); }); @@ -1163,15 +1173,15 @@ $(document).on( "click", ".result-object", function(e){ end = original_length; } if(start > end) { - Materialize.toast("Start can't be before the end..", 3000, "red lighten"); + M.toast({html: "Start can't be before the end..", displayLength: 3000, classes: "red lighten"}); } else if(start < 0) { - Materialize.toast("Start can't be less than 0..", 3000, "red lighten"); + M.toast({html: "Start can't be less than 0..", displayLength: 3000, classes: "red lighten"}); } else { try { var length = parseInt(end) - parseInt(start); Search.submitAndClose(id, title, length, start, end); } catch(e) { - Materialize.toast("Only numbers are accepted as song start and end parameters..", 3000, "red lighten"); + M.toast({html: "Only numbers are accepted as song start and end parameters..", displayLength: 3000, classes: "red lighten"}); } } } @@ -1250,16 +1260,16 @@ $(document).on( "click", "#add-many", function(e){ end = original_length; } if(start > end) { - Materialize.toast("Start can't be before the end..", 3000, "red lighten"); + M.toast({html: "Start can't be before the end..", displayLength: 3000, classes: "red lighten"}); } else if(start < 0) { - Materialize.toast("Start can't be less than 0..", 3000, "red lighten"); + M.toast({html: "Start can't be less than 0..", displayLength: 3000, classes: "red lighten"}); } else { try { var length = parseInt(end) - parseInt(start); $(this).parent().parent().parent().remove(); Search.submit(id, title, length, false, 0, 1, start, end); } catch(e) { - Materialize.toast("Only numbers are accepted as song start and end parameters..", 3000, "red lighten"); + M.toast({html: "Only numbers are accepted as song start and end parameters..", displayLength: 3000, classes: "red lighten"}); } } diff --git a/server/public/assets/js/remotecontroller.js b/server/public/assets/js/remotecontroller.js index beee6a7f..e0e6da8c 100755 --- a/server/public/assets/js/remotecontroller.js +++ b/server/public/assets/js/remotecontroller.js @@ -60,6 +60,7 @@ var Remotecontroller = { document.getElementById("remoteform").chan.value = ""; start = false; + $(".volume-elements").css("display", "flex"); $(".rc").css("display", "block"); //document.getElementById("base").setAttribute("onsubmit", "control(); return false;"); diff --git a/server/public/assets/js/search.js b/server/public/assets/js/search.js index 2c357fc0..419b4613 100755 --- a/server/public/assets/js/search.js +++ b/server/public/assets/js/search.js @@ -363,7 +363,7 @@ var Search = { $("#playlist_loader").addClass("hide"); $("#import").removeClass("hide"); before_toast(); - Materialize.toast("It seems you've entered a invalid url.", 4000); + M.toast({html: "It seems you've entered a invalid url.", displayLength: 4000}); } } else { @@ -380,7 +380,6 @@ var Search = { }); if(response.nextPageToken) { - console.log(Search.submitYouTubeExpected); //Search.addVideos(ids, true, 0, false, this_length); Search.importPlaylist(pId, response.nextPageToken); } else { @@ -416,7 +415,7 @@ var Search = { $("#import_spotify").removeClass("hide"); $("#playlist_loader_spotify").addClass("hide"); before_toast(); - Materialize.toast("It seems you've entered a invalid url.", 4000); + M.toast({html: "It seems you've entered a invalid url.", displayLength: 4000}); } }); }, diff --git a/server/public/assets/js/token_apply.js b/server/public/assets/js/token_apply.js index 33141669..aee314b5 100644 --- a/server/public/assets/js/token_apply.js +++ b/server/public/assets/js/token_apply.js @@ -33,13 +33,13 @@ $(document).ready(function() { success: function(response) { $(".full-form-token").addClass("hide"); if(response == "success") { - Materialize.toast("Email sent!", 3000, "green lighten"); + M.toast({html: "Email sent!", displayLength: 3000, classes: "green lighten"}); } else { $("#email_address").attr("readonly", false); $(".submit").toggleClass("disabled"); $("#origin").attr("readonly", false); grecaptcha.reset(); - Materialize.toast("Something went wrong. Sure that email hasn't been used for another token?", 3000, "red lighten"); + M.toast({html: "Something went wrong. Sure that email hasn't been used for another token?",displayLength: 3000, classes: "red lighten"}); } }, error: function(response) { diff --git a/server/public/layouts/client/main.handlebars b/server/public/layouts/client/main.handlebars index 5c69d36f..223163a5 100644 --- a/server/public/layouts/client/main.handlebars +++ b/server/public/layouts/client/main.handlebars @@ -30,7 +30,7 @@ {{/unless}} - + {{#unless embed}} @@ -54,13 +54,13 @@ {{{body}}} {{#unless embed}} {{#unless client}} -
+
Chromecast

This site supports chromecasting!

-
+
@@ -85,7 +85,7 @@
{{/unless}} - + diff --git a/server/public/partials/channel/header.handlebars b/server/public/partials/channel/header.handlebars index 904c476e..e802e1d5 100644 --- a/server/public/partials/channel/header.handlebars +++ b/server/public/partials/channel/header.handlebars @@ -13,7 +13,7 @@ Loading...
  • - +
  • -
  • - +
  • +
  • -
  • -
  • - +
  • +
  • @@ -55,7 +55,7 @@
  • -