mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Merge pull request #334 from zoff-music/feature/materializecss-beta
Changed to materlializeCSS beta-1, that doesn't use jQuery
This commit is contained in:
@@ -15,7 +15,7 @@ function requested_change(type, string, channel) {
|
||||
var message = "A " + type + " change was requested on <b>" + channel + "</b><br><br>New supposed value is: <br><br><b>" + string + "</b><br><br><br> \
|
||||
Go to <a href='https://admin.zoff.me/'>https://admin.zoff.me/</a> 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,
|
||||
|
||||
@@ -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){
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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 = $("<div>" + e + "</div>");
|
||||
|
||||
$('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! <a class='waves-effect waves-light btn light-green' href='#' id='cookieok' style='cursor:pointer;pointer-events:all;margin-left:10px;'> ok</a>", 10000);
|
||||
M.toast({html: "We're using cookies to enhance your experience! <a class='waves-effect waves-light btn light-green' href='#' id='cookieok' style='cursor:pointer;pointer-events:all;margin-left:10px;'> ok</a>", displayLength: 10000});
|
||||
}
|
||||
|
||||
var pad = 0;
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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"});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;");
|
||||
|
||||
@@ -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});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<link rel="icon" id="favicon" type="image/png" sizes="16x16" href="/assets/images/favicon-16x16.png">
|
||||
<link rel="mask-icon" href="/assets/images/safari-pinned-tab.svg" color="#2d2d2d">
|
||||
{{/unless}}
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-beta/css/materialize.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="/assets/css/{{stylesheet}}" title="Default">
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" media="none" onload="if(media!='all')media='all'">
|
||||
{{#unless embed}}
|
||||
@@ -54,13 +54,13 @@
|
||||
{{{body}}}
|
||||
{{#unless embed}}
|
||||
{{#unless client}}
|
||||
<div class="tap-target" data-activates="castButton">
|
||||
<div class="tap-target" data-target="castButton">
|
||||
<div class="tap-target-content">
|
||||
<h5>Chromecast</h5>
|
||||
<p>This site supports chromecasting!</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tap-target-join" data-activates="chan">
|
||||
<div class="tap-target-join" data-target="chan">
|
||||
<div class="tap-target-content">
|
||||
</div>
|
||||
</div>
|
||||
@@ -85,7 +85,7 @@
|
||||
<div id="context-menu-overlay" class="hide"></div>
|
||||
{{/unless}}
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-beta/js/materialize.min.js"></script>
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.1.0/socket.io.slim.js"></script>
|
||||
<script type="text/javascript" src="/assets/dist/lib/jquery-ui.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/spectrum/1.8.0/spectrum.min.js"></script>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
Loading...
|
||||
</li>
|
||||
<li class="search-container hide" id="search-wrapper">
|
||||
<input id="search" class="search_input" type="text" title="Search for songs..." placeholder="Find song on YouTube..." onsubmit="null;" autocomplete="off" />
|
||||
<input id="search" class="search_input white-text" type="text" title="Search for songs..." placeholder="Find song on YouTube..." onsubmit="null;" autocomplete="off" />
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="right control-list noselect">
|
||||
@@ -32,20 +32,20 @@
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a class="nav-btn" href="#find" id="search-btn">
|
||||
<li class="search-btn-container">
|
||||
<div class="nav-btn" id="search-btn">
|
||||
<i class="material-icons">search</i>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="skip_next_client hide">
|
||||
<a href="#skip" class="nav-btn skip">
|
||||
<div class="nav-btn skip">
|
||||
<i class="material-icons">skip_next</i>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a class="nav-btn" href="#stir" id="shuffle">
|
||||
<li class="shuffle-btn-container">
|
||||
<div class="nav-btn" id="shuffle">
|
||||
<i class="material-icons">shuffle</i>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
<li class="settings-hamburger" data-activates="settings-bar" id="settings">
|
||||
<div class="hamburger-sidenav">
|
||||
@@ -55,7 +55,7 @@
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="side-nav" id="settings-bar">
|
||||
<ul class="sidenav" id="settings-bar">
|
||||
{{> channel/panel}}
|
||||
</ul>
|
||||
{{> channel/search}}
|
||||
|
||||
@@ -4,16 +4,20 @@
|
||||
<h4>Embed</h4>
|
||||
<p>Copy the code in the textarea, and paste on your website.</p>
|
||||
<p>
|
||||
<input type="checkbox" id="autoplay" checked="checked" />
|
||||
<label for="autoplay" class="padding_right_26">Autoplay</label>
|
||||
<label>
|
||||
<input type="checkbox" id="autoplay" checked="checked" />
|
||||
<span for="autoplay" class="padding_right_26">Autoplay</span>
|
||||
</label>
|
||||
<label for="width_embed" class="embed-label">Width</label>
|
||||
<input type="number" value="600" id="width_embed" class="settings_embed" min="1" />
|
||||
<label for="height_embed" class="padding_left_6 embed-label">Height</label>
|
||||
<input type="number" value="300" id="height_embed" class="settings_embed" min="1" />
|
||||
<label for="color_embed" class="padding_left_6 embed-label">Color</label>
|
||||
<input type="text" id="color_embed" class="settings_embed" value="#808080" />
|
||||
<input type="checkbox" id="videoonly" />
|
||||
<label for="videoonly" class="padding_right_26">Video-only</label>
|
||||
<label>
|
||||
<input type="checkbox" id="videoonly" class="checkbox" />
|
||||
<span for="videoonly" class="padding_right_26">Video-only</span>
|
||||
</label>
|
||||
</p>
|
||||
<textarea id="embed-area"></textarea>
|
||||
</div>
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
<div class="search-title truncate"></div>
|
||||
<div class="result-start-end-container">
|
||||
<span class="start-end-info show-only-mobile">Start/End</span>
|
||||
<input type="number" min="0" class="result-start" value="0">
|
||||
<input type="number" min="0" class="result-start white-text" value="0">
|
||||
/
|
||||
<input type="number" min="0" class="result-end" value="0">
|
||||
<input type="number" min="0" class="result-end white-text" value="0">
|
||||
</div>
|
||||
<div class="result-get-more-info waves-effect waves-light">
|
||||
<i class="material-icons">keyboard_arrow_left</i>
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
spellcheck="false"
|
||||
maxlength="18"
|
||||
/>
|
||||
<a href="#" class="generate-channel-name white-text hide-on-small-only">
|
||||
<div class="generate-channel-name white-text hide-on-small-only">
|
||||
<i class="material-icons">autorenew</i>
|
||||
</a>
|
||||
</div>
|
||||
<label for="autocomplete-input" class="noselect label-for-mobile-frontpage">Find or create radio channel</label>
|
||||
<button class="listen-button btn waves-effect waves-light white-text col s2">Listen</button>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="volume-elements">
|
||||
<div class="volume-elements" style="display: none;">
|
||||
<div class="rc" id="volume-control" title="Volume"></div>
|
||||
<i class="material-icons slider-vol rc">volume_up</i>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user