mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-12-08 20:48:48 +00:00
Moved chat window and made improvements for iphone
This commit is contained in:
@@ -5,11 +5,11 @@ var gulp = require('gulp'),
|
|||||||
|
|
||||||
gulp.task('js', function () {
|
gulp.task('js', function () {
|
||||||
gulp.src(['static/js/*.js', '!static/js/embed*', '!static/js/remotecontroller.js'])
|
gulp.src(['static/js/*.js', '!static/js/embed*', '!static/js/remotecontroller.js'])
|
||||||
/*.pipe(uglify({
|
.pipe(uglify({
|
||||||
mangle: true,
|
mangle: true,
|
||||||
compress: true,
|
compress: true,
|
||||||
enclose: true
|
enclose: true
|
||||||
}))*/
|
}))
|
||||||
.pipe(concat('main.min.js'))
|
.pipe(concat('main.min.js'))
|
||||||
.pipe(gulp.dest('static/dist'));
|
.pipe(gulp.dest('static/dist'));
|
||||||
});
|
});
|
||||||
|
|||||||
81
index.php
81
index.php
@@ -98,12 +98,6 @@
|
|||||||
<span class="hover-text">Stir</span>
|
<span class="hover-text">Stir</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
|
||||||
<a class="nav-btn hide-on-small-only" href="#chat_btn" data-activates="chat-bar" id="chat-btn">
|
|
||||||
<i class="tiny mdi-communication-message"></i>
|
|
||||||
<span class="hover-text">Chat</span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li>
|
<li>
|
||||||
<a class="nav-btn" href="#settings" data-activates="settings-bar" id="settings">
|
<a class="nav-btn" href="#settings" data-activates="settings-bar" id="settings">
|
||||||
<i class="mdi-action-settings"></i>
|
<i class="mdi-action-settings"></i>
|
||||||
@@ -172,36 +166,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<main class="container center-align main">
|
<main class="container center-align main">
|
||||||
<div id="main-row" class="row">
|
<div id="main-row" class="row">
|
||||||
<div class="col s12 m9 video-container no-opacity hide-on-small-only">
|
<div class="col s12 m9 video-container no-opacity click-through">
|
||||||
|
|
||||||
<ul class="side-nav left-aligned chat-bar" id="chat-bar">
|
|
||||||
<li id="chat-log">
|
|
||||||
<ul class="collapsible collapsible-accordion inherit-height">
|
|
||||||
<li class="active inherit-height">
|
|
||||||
|
|
||||||
<div class="collapsible-body inherit-height" style="display: block;">
|
|
||||||
<!--<ul id="chat inherit-height">-->
|
|
||||||
<div class="row inherit-height">
|
|
||||||
<div class="col s12">
|
|
||||||
<ul class="tabs">
|
|
||||||
<li class="tab col s3 chat-tab-li"><a class="active chat-tab truncate" href="#channelchat"><?php echo $list; ?></a></li>
|
|
||||||
<li class="tab col s3 chat-tab-li"><a class="chat-tab" href="#all_chat">All</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div id="channelchat" class="col s12 inherit-height"><ul id="chatchannel" class="inherit-height"></ul></div>
|
|
||||||
<div id="all_chat" class="col s12 inherit-height"><ul id="chatall" class="inherit-height"></ul></div>
|
|
||||||
</div>
|
|
||||||
<!--</ul>-->
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li id="chat-input">
|
|
||||||
<form action="#" id="chatForm" onsubmit="return false;">
|
|
||||||
<input id="text-chat-input" name="input" type="text" autocomplete="off" placeholder="Chat" maxlength="150" />
|
|
||||||
</form>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
<!--
|
<!--
|
||||||
width: calc(100% - 261px);
|
width: calc(100% - 261px);
|
||||||
display: inline;
|
display: inline;
|
||||||
@@ -233,13 +198,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="playlist" class="col s12 m3">
|
<div id="playlist" class="col s12 m3">
|
||||||
<div id="top-button" title="Scroll to the top" class="rounded-bottom hide hide-on-small-only">Top</div>
|
<div id="top-button" title="Scroll to the top" class="rounded-bottom hide top-button-with-tabs hide-on-small-only">Top</div>
|
||||||
<div id="bottom-button" title="Scroll to the bottom" class="rounded-top hide hide-on-small-only">Bottom</div>
|
<div id="bottom-button" title="Scroll to the bottom" class="rounded-top hide hide-on-small-only">Bottom</div>
|
||||||
<ul class="tabs playlist-tabs hide-on-small-only hide">
|
<ul class="tabs playlist-tabs">
|
||||||
<li class="tab col s3"><a class="playlist-tab-links" href="#wrapper">Playlist</a></li>
|
<li class="tab col s3"><a class="playlist-tab-links playlist-link active" href="#wrapper">Playlist</a></li>
|
||||||
<li class="tab col s3"><a class="playlist-tab-links" href="#suggestions">Suggested</a></li>
|
<li class="tab col s3"><a class="playlist-tab-links chat-link" href="#chat">Chat</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<div id="wrapper">
|
<ul class="tabs playlist-tabs-loggedIn hide" style="width: 100%;">
|
||||||
|
<li class="tab col s3"><a class="playlist-tab-links playlist-link active" href="#wrapper">Playlist</a></li>
|
||||||
|
<li class="tab col s3"><a class="playlist-tab-links suggested-link" href="#suggestions">Suggested</a></li>
|
||||||
|
<li class="tab col s3"><a class="playlist-tab-links chat-link" href="#chat">Chat</a></li>
|
||||||
|
</ul>
|
||||||
|
<div id="wrapper" class="tabs_height">
|
||||||
<div id="list-song-html">
|
<div id="list-song-html">
|
||||||
<div id="list-song" class="card left-align list-song">
|
<div id="list-song" class="card left-align list-song">
|
||||||
<span class="clickable vote-container" title="Vote!">
|
<span class="clickable vote-container" title="Vote!">
|
||||||
@@ -260,7 +230,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="suggestions" class="tabs_height hide-on-small-only">
|
<div id="suggestions" class="tabs_height" style="display:none;">
|
||||||
<p class="suggest-title-info">YouTube Suggests:</p>
|
<p class="suggest-title-info">YouTube Suggests:</p>
|
||||||
<div class="suggest_bar" id="suggest-song-html">
|
<div class="suggest_bar" id="suggest-song-html">
|
||||||
</div>
|
</div>
|
||||||
@@ -268,6 +238,33 @@
|
|||||||
<div class="suggest_bar" id="user-suggest-html">
|
<div class="suggest_bar" id="user-suggest-html">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="chatPlaylist" class="tabs_height" style="display:none;">
|
||||||
|
<ul class="" id="chat-bar">
|
||||||
|
<li id="chat-log">
|
||||||
|
<ul class="inherit-height">
|
||||||
|
<li class="active inherit-height">
|
||||||
|
<!--<ul id="chat inherit-height">-->
|
||||||
|
<div class="row inherit-height">
|
||||||
|
<div class="col s12">
|
||||||
|
<ul class="tabs chatTabs">
|
||||||
|
<li class="tab col s3 chat-tab-li"><a class="active chat-tab truncate" href="#channelchat"><?php echo $list; ?></a></li>
|
||||||
|
<li class="tab col s3 chat-tab-li"><a class="chat-tab" href="#all_chat">All</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div id="channelchat" class="col s12 inherit-height"><ul id="chatchannel" class="inherit-height"></ul></div>
|
||||||
|
<div id="all_chat" class="col s12 inherit-height"><ul id="chatall" class="inherit-height"></ul></div>
|
||||||
|
</div>
|
||||||
|
<!--</ul>-->
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li id="chat-input">
|
||||||
|
<form action="#" id="chatForm" onsubmit="return false;">
|
||||||
|
<input id="text-chat-input" name="input" type="text" autocomplete="off" placeholder="Chat" maxlength="150" />
|
||||||
|
</form>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="playbar">
|
<div id="playbar">
|
||||||
|
|||||||
@@ -647,7 +647,7 @@ hide mdi-action-visibility mdi-action-visibility-off
|
|||||||
line-height:24px;
|
line-height:24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.playlist-tabs .indicator{
|
.playlist-tabs .indicator, .playlist-tabs-loggedIn .indicator{
|
||||||
background-color:white !important;
|
background-color:white !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -655,11 +655,15 @@ hide mdi-action-visibility mdi-action-visibility-off
|
|||||||
width:50%;
|
width:50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.playlist-tabs-loggedIn .indicator{
|
||||||
|
width:33.333%;
|
||||||
|
}
|
||||||
|
|
||||||
.playlist-tab-links{
|
.playlist-tab-links{
|
||||||
color:white !important;
|
color:white !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.playlist-tabs{
|
.playlist-tabs, .playlist-tabs-loggedIn{
|
||||||
background-color:rgba(0,0,0,0) !important;
|
background-color:rgba(0,0,0,0) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -724,12 +728,16 @@ hide mdi-action-visibility mdi-action-visibility-off
|
|||||||
margin:0 !important;
|
margin:0 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#text-chat-input{
|
||||||
|
width:95%;
|
||||||
|
}
|
||||||
|
|
||||||
.indicator {
|
.indicator {
|
||||||
background-color:black !important;
|
background-color:black !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#channelchat, #all_chat{
|
#channelchat, #all_chat{
|
||||||
height: calc(100vh - 193px);
|
height: calc(100vh - 241px);
|
||||||
margin: 0px 5px;
|
margin: 0px 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -747,12 +755,10 @@ hide mdi-action-visibility mdi-action-visibility-off
|
|||||||
}
|
}
|
||||||
|
|
||||||
#chat-bar{
|
#chat-bar{
|
||||||
position: absolute;
|
|
||||||
display: inline;
|
|
||||||
will-change: left;
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
background: white;
|
||||||
float: left;
|
background: white;
|
||||||
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
#chat-btn i {
|
#chat-btn i {
|
||||||
@@ -761,7 +767,7 @@ hide mdi-action-visibility mdi-action-visibility-off
|
|||||||
}
|
}
|
||||||
|
|
||||||
ul #chat-log{
|
ul #chat-log{
|
||||||
padding: 0px 0px 0px 11px !important;
|
/*padding: 0px 0px 0px 11px !important;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
#chat li{
|
#chat li{
|
||||||
@@ -1292,6 +1298,10 @@ nav ul li:hover, nav ul li.active {
|
|||||||
right: 0;
|
right: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#all_chat, #channelchat{
|
||||||
|
height: calc(100vh - 352px);
|
||||||
|
}
|
||||||
|
|
||||||
#fp-nav{
|
#fp-nav{
|
||||||
position:initial;
|
position:initial;
|
||||||
width:initial;
|
width:initial;
|
||||||
@@ -1386,6 +1396,11 @@ nav ul li:hover, nav ul li.active {
|
|||||||
.main, #main-row, .video-container, #playlist{
|
.main, #main-row, .video-container, #playlist{
|
||||||
height:auto !important;
|
height:auto !important;
|
||||||
margin-bottom: -5px;
|
margin-bottom: -5px;
|
||||||
|
margin-top:-6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.click-through{
|
||||||
|
pointer-events:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.video-container{
|
.video-container{
|
||||||
@@ -1394,7 +1409,7 @@ nav ul li:hover, nav ul li.active {
|
|||||||
width: 106vw !important;
|
width: 106vw !important;
|
||||||
height: 200px !important;
|
height: 200px !important;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
bottom: 4px;
|
bottom: 22px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chan {
|
.chan {
|
||||||
|
|||||||
2
static/dist/embed.min.js
vendored
2
static/dist/embed.min.js
vendored
File diff suppressed because one or more lines are too long
106
static/dist/main.min.js
vendored
106
static/dist/main.min.js
vendored
@@ -82,11 +82,12 @@ var Admin = {
|
|||||||
$("#admin-lock").removeClass("mdi-action-lock");
|
$("#admin-lock").removeClass("mdi-action-lock");
|
||||||
$("#password").val("");
|
$("#password").val("");
|
||||||
$("#password").attr("placeholder", "Change channel password")
|
$("#password").attr("placeholder", "Change channel password")
|
||||||
if(!window.mobilecheck()){
|
//if(!window.mobilecheck()){
|
||||||
$(".playlist-tabs").removeClass("hide");
|
$(".playlist-tabs-loggedIn").removeClass("hide");
|
||||||
$("#top-button").toggleClass("top-button-with-tabs");
|
$(".playlist-tabs").addClass("hide");
|
||||||
$("#wrapper").toggleClass("tabs_height");
|
//$("#top-button").toggleClass("top-button-with-tabs");
|
||||||
}
|
//$("#wrapper").toggleClass("tabs_height");
|
||||||
|
//}
|
||||||
|
|
||||||
if(!Helper.contains($("#admin-lock").attr("class").split(" "), "mdi-action-lock-open"))
|
if(!Helper.contains($("#admin-lock").attr("class").split(" "), "mdi-action-lock-open"))
|
||||||
$("#admin-lock").addClass("mdi-action-lock-open clickable");
|
$("#admin-lock").addClass("mdi-action-lock-open clickable");
|
||||||
@@ -142,8 +143,9 @@ var Admin = {
|
|||||||
$("#admin-lock").addClass("mdi-action-lock");
|
$("#admin-lock").addClass("mdi-action-lock");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!Helper.contains($(".playlist-tabs").attr("class").split(" "), "hide")){
|
if(!Helper.contains($(".playlist-tabs-loggedIn").attr("class").split(" "), "hide")){
|
||||||
$(".playlist-tabs").addClass("hide");
|
$(".playlist-tabs-loggedIn").addClass("hide");
|
||||||
|
$(".playlist-tabs").removeClass("hide");
|
||||||
}
|
}
|
||||||
|
|
||||||
if($(".card-action").length != 0 &&
|
if($(".card-action").length != 0 &&
|
||||||
@@ -152,10 +154,10 @@ var Admin = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$('ul.tabs').tabs('select_tab', 'wrapper');
|
$('ul.tabs').tabs('select_tab', 'wrapper');
|
||||||
$("#wrapper").removeClass("tabs_height");
|
//$("#wrapper").removeClass("tabs_height");
|
||||||
$("#admin-lock").removeClass("mdi-action-lock-open clickable");
|
$("#admin-lock").removeClass("mdi-action-lock-open clickable");
|
||||||
$("#password").attr("placeholder", "Enter channel password");
|
$("#password").attr("placeholder", "Enter channel password");
|
||||||
$("#top-button").removeClass("top-button-with-tabs");
|
//$("#top-button").removeClass("top-button-with-tabs");
|
||||||
},
|
},
|
||||||
|
|
||||||
//function used in html onlick
|
//function used in html onlick
|
||||||
@@ -174,8 +176,8 @@ var Admin = {
|
|||||||
if(conf_array['adminpass'] == "" || !w_p){
|
if(conf_array['adminpass'] == "" || !w_p){
|
||||||
hasadmin = false;
|
hasadmin = false;
|
||||||
if(!window.mobilecheck()){
|
if(!window.mobilecheck()){
|
||||||
$(".playlist-tabs").removeClass("hide");
|
//$(".playlist-tabs").removeClass("hide");
|
||||||
$("#wrapper").toggleClass("tabs_height");
|
//$("#wrapper").toggleClass("tabs_height");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else hasadmin = true;
|
else hasadmin = true;
|
||||||
@@ -252,7 +254,7 @@ var Chat = {
|
|||||||
}else if(data.value.startsWith("/removename")){
|
}else if(data.value.startsWith("/removename")){
|
||||||
Chat.removename();
|
Chat.removename();
|
||||||
}
|
}
|
||||||
else if($(".tab a.active").attr("href") == "#all_chat")
|
else if($(".chat-tab-li a.active").attr("href") == "#all_chat")
|
||||||
socket.emit("all,chat", data.value);
|
socket.emit("all,chat", data.value);
|
||||||
else
|
else
|
||||||
socket.emit("chat", data.value);
|
socket.emit("chat", data.value);
|
||||||
@@ -1192,7 +1194,8 @@ function init(){
|
|||||||
window.location.reload(true);
|
window.location.reload(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$('ul.tabs').tabs();
|
$('ul.playlist-tabs').tabs();
|
||||||
|
$('.chatTabs').tabs();
|
||||||
$("#settings").sideNav({
|
$("#settings").sideNav({
|
||||||
menuWidth: 300, // Default is 240
|
menuWidth: 300, // Default is 240
|
||||||
edge: 'right', // Choose the horizontal origin
|
edge: 'right', // Choose the horizontal origin
|
||||||
@@ -1255,41 +1258,28 @@ function init(){
|
|||||||
Player.getTitle(song_title, viewers);
|
Player.getTitle(song_title, viewers);
|
||||||
});
|
});
|
||||||
|
|
||||||
if(/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream){
|
Chat.setup_chat_listener(chan);
|
||||||
document.getElementById("search").blur();
|
Chat.allchat_listener();
|
||||||
Player.readyLooks();
|
if(!window.mobilecheck()) Hostcontroller.host_listener();
|
||||||
}else{
|
window.onYouTubeIframeAPIReady = Player.onYouTubeIframeAPIReady;
|
||||||
Chat.setup_chat_listener(chan);
|
Player.loadPlayer();
|
||||||
Chat.allchat_listener();
|
|
||||||
if(!window.mobilecheck()) Hostcontroller.host_listener();
|
|
||||||
window.onYouTubeIframeAPIReady = Player.onYouTubeIframeAPIReady;
|
|
||||||
Player.loadPlayer();
|
|
||||||
|
|
||||||
$("#chat-btn").sideNav({
|
if(!Helper.msieversion()) Notification.requestPermission();
|
||||||
menuWidth: 272, // Default is 240
|
|
||||||
edge: 'left', // Choose the horizontal origin
|
git_info = $.ajax({ type: "GET",
|
||||||
closeOnClick: false // Closes side-nav on <a> clicks, useful for Angular/Meteor
|
url: "https://api.github.com/repos/zoff-music/zoff/commits",
|
||||||
});
|
async: false
|
||||||
|
}).responseText;
|
||||||
|
|
||||||
if($(".drag-target").length > 0) $(".drag-target")[1].remove();
|
git_info = $.parseJSON(git_info);
|
||||||
|
$("#latest-commit").html("Latest Commit: <br>"
|
||||||
|
+ git_info[0].commit.author.date.substring(0,10)
|
||||||
|
+ ": " + git_info[0].committer.login
|
||||||
|
+ "<br><a href='"+git_info[0].html_url+"'>"
|
||||||
|
+ git_info[0].sha.substring(0,10) + "</a>: "
|
||||||
|
+ git_info[0].commit.message+"<br");
|
||||||
|
|
||||||
if(!Helper.msieversion()) Notification.requestPermission();
|
Helper.sample();
|
||||||
|
|
||||||
git_info = $.ajax({ type: "GET",
|
|
||||||
url: "https://api.github.com/repos/zoff-music/zoff/commits",
|
|
||||||
async: false
|
|
||||||
}).responseText;
|
|
||||||
|
|
||||||
git_info = $.parseJSON(git_info);
|
|
||||||
$("#latest-commit").html("Latest Commit: <br>"
|
|
||||||
+ git_info[0].commit.author.date.substring(0,10)
|
|
||||||
+ ": " + git_info[0].committer.login
|
|
||||||
+ "<br><a href='"+git_info[0].html_url+"'>"
|
|
||||||
+ git_info[0].sha.substring(0,10) + "</a>: "
|
|
||||||
+ git_info[0].commit.message+"<br");
|
|
||||||
|
|
||||||
Helper.sample();
|
|
||||||
}
|
|
||||||
|
|
||||||
$( "#results" ).hover( function() { $("div.result").removeClass("hoverResults"); i = 0; }, function(){ });
|
$( "#results" ).hover( function() { $("div.result").removeClass("hoverResults"); i = 0; }, function(){ });
|
||||||
$("#search").focus();
|
$("#search").focus();
|
||||||
@@ -1441,6 +1431,24 @@ $(document).on("submit", "#adminForm", function(e){
|
|||||||
Admin.pass_save();
|
Admin.pass_save();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(document).on("click", ".chat-link", function(e){
|
||||||
|
$("#chatPlaylist").css("display", "block");
|
||||||
|
$("#wrapper").css("display", "none");
|
||||||
|
$("#suggestions").css("display", "none");
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on("click", ".playlist-link", function(e){
|
||||||
|
$("#chatPlaylist").css("display", "none");
|
||||||
|
$("#wrapper").css("display", "block");
|
||||||
|
$("#suggestions").css("display", "none");
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on("click", ".suggested-link", function(e){
|
||||||
|
$("#chatPlaylist").css("display", "none");
|
||||||
|
$("#wrapper").css("display", "none");
|
||||||
|
$("#suggestions").css("display", "block");
|
||||||
|
});
|
||||||
|
|
||||||
$(document).on("submit", "#chatForm", function(){
|
$(document).on("submit", "#chatForm", function(){
|
||||||
Chat.chat(document.getElementById("chatForm").input);
|
Chat.chat(document.getElementById("chatForm").input);
|
||||||
});
|
});
|
||||||
@@ -2401,7 +2409,7 @@ var Playercontrols = {
|
|||||||
|
|
||||||
initYoutubeControls: function()
|
initYoutubeControls: function()
|
||||||
{
|
{
|
||||||
if(window.mobilecheck() && !/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream){
|
if(window.mobilecheck() && !window.MSStream){
|
||||||
$("#controls").appendTo("#playbar");
|
$("#controls").appendTo("#playbar");
|
||||||
}
|
}
|
||||||
Playercontrols.initControls();
|
Playercontrols.initControls();
|
||||||
@@ -2452,15 +2460,17 @@ var Playercontrols = {
|
|||||||
if(Player.ytplayer.getPlayerState() == 1)
|
if(Player.ytplayer.getPlayerState() == 1)
|
||||||
{
|
{
|
||||||
Player.ytplayer.pauseVideo();
|
Player.ytplayer.pauseVideo();
|
||||||
if(window.mobilecheck() && !/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream){
|
if(window.mobilecheck() && !window.MSStream){
|
||||||
document.getElementById("player").style.display = "none";
|
document.getElementById("player").style.display = "none";
|
||||||
|
$(".video-container").toggleClass("click-through");
|
||||||
$(".page-footer").toggleClass("padding-bottom-extra");
|
$(".page-footer").toggleClass("padding-bottom-extra");
|
||||||
}
|
}
|
||||||
}else if(Player.ytplayer.getPlayerState() == 2 || Player.ytplayer.getPlayerState() == 0)
|
}else if(Player.ytplayer.getPlayerState() == 2 || Player.ytplayer.getPlayerState() == 0)
|
||||||
{
|
{
|
||||||
Player.ytplayer.playVideo();
|
Player.ytplayer.playVideo();
|
||||||
if(window.mobilecheck() && !/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream){
|
if(window.mobilecheck() && !window.MSStream){
|
||||||
document.getElementById("player").style.display = "block";
|
document.getElementById("player").style.display = "block";
|
||||||
|
$(".video-container").toggleClass("click-through");
|
||||||
$(".page-footer").toggleClass("padding-bottom-extra");
|
$(".page-footer").toggleClass("padding-bottom-extra");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,11 +82,12 @@ var Admin = {
|
|||||||
$("#admin-lock").removeClass("mdi-action-lock");
|
$("#admin-lock").removeClass("mdi-action-lock");
|
||||||
$("#password").val("");
|
$("#password").val("");
|
||||||
$("#password").attr("placeholder", "Change channel password")
|
$("#password").attr("placeholder", "Change channel password")
|
||||||
if(!window.mobilecheck()){
|
//if(!window.mobilecheck()){
|
||||||
$(".playlist-tabs").removeClass("hide");
|
$(".playlist-tabs-loggedIn").removeClass("hide");
|
||||||
$("#top-button").toggleClass("top-button-with-tabs");
|
$(".playlist-tabs").addClass("hide");
|
||||||
$("#wrapper").toggleClass("tabs_height");
|
//$("#top-button").toggleClass("top-button-with-tabs");
|
||||||
}
|
//$("#wrapper").toggleClass("tabs_height");
|
||||||
|
//}
|
||||||
|
|
||||||
if(!Helper.contains($("#admin-lock").attr("class").split(" "), "mdi-action-lock-open"))
|
if(!Helper.contains($("#admin-lock").attr("class").split(" "), "mdi-action-lock-open"))
|
||||||
$("#admin-lock").addClass("mdi-action-lock-open clickable");
|
$("#admin-lock").addClass("mdi-action-lock-open clickable");
|
||||||
@@ -142,8 +143,9 @@ var Admin = {
|
|||||||
$("#admin-lock").addClass("mdi-action-lock");
|
$("#admin-lock").addClass("mdi-action-lock");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!Helper.contains($(".playlist-tabs").attr("class").split(" "), "hide")){
|
if(!Helper.contains($(".playlist-tabs-loggedIn").attr("class").split(" "), "hide")){
|
||||||
$(".playlist-tabs").addClass("hide");
|
$(".playlist-tabs-loggedIn").addClass("hide");
|
||||||
|
$(".playlist-tabs").removeClass("hide");
|
||||||
}
|
}
|
||||||
|
|
||||||
if($(".card-action").length != 0 &&
|
if($(".card-action").length != 0 &&
|
||||||
@@ -152,10 +154,10 @@ var Admin = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$('ul.tabs').tabs('select_tab', 'wrapper');
|
$('ul.tabs').tabs('select_tab', 'wrapper');
|
||||||
$("#wrapper").removeClass("tabs_height");
|
//$("#wrapper").removeClass("tabs_height");
|
||||||
$("#admin-lock").removeClass("mdi-action-lock-open clickable");
|
$("#admin-lock").removeClass("mdi-action-lock-open clickable");
|
||||||
$("#password").attr("placeholder", "Enter channel password");
|
$("#password").attr("placeholder", "Enter channel password");
|
||||||
$("#top-button").removeClass("top-button-with-tabs");
|
//$("#top-button").removeClass("top-button-with-tabs");
|
||||||
},
|
},
|
||||||
|
|
||||||
//function used in html onlick
|
//function used in html onlick
|
||||||
@@ -174,8 +176,8 @@ var Admin = {
|
|||||||
if(conf_array['adminpass'] == "" || !w_p){
|
if(conf_array['adminpass'] == "" || !w_p){
|
||||||
hasadmin = false;
|
hasadmin = false;
|
||||||
if(!window.mobilecheck()){
|
if(!window.mobilecheck()){
|
||||||
$(".playlist-tabs").removeClass("hide");
|
//$(".playlist-tabs").removeClass("hide");
|
||||||
$("#wrapper").toggleClass("tabs_height");
|
//$("#wrapper").toggleClass("tabs_height");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else hasadmin = true;
|
else hasadmin = true;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ var Chat = {
|
|||||||
}else if(data.value.startsWith("/removename")){
|
}else if(data.value.startsWith("/removename")){
|
||||||
Chat.removename();
|
Chat.removename();
|
||||||
}
|
}
|
||||||
else if($(".tab a.active").attr("href") == "#all_chat")
|
else if($(".chat-tab-li a.active").attr("href") == "#all_chat")
|
||||||
socket.emit("all,chat", data.value);
|
socket.emit("all,chat", data.value);
|
||||||
else
|
else
|
||||||
socket.emit("chat", data.value);
|
socket.emit("chat", data.value);
|
||||||
|
|||||||
@@ -83,7 +83,8 @@ function init(){
|
|||||||
window.location.reload(true);
|
window.location.reload(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$('ul.tabs').tabs();
|
$('ul.playlist-tabs').tabs();
|
||||||
|
$('.chatTabs').tabs();
|
||||||
$("#settings").sideNav({
|
$("#settings").sideNav({
|
||||||
menuWidth: 300, // Default is 240
|
menuWidth: 300, // Default is 240
|
||||||
edge: 'right', // Choose the horizontal origin
|
edge: 'right', // Choose the horizontal origin
|
||||||
@@ -146,41 +147,28 @@ function init(){
|
|||||||
Player.getTitle(song_title, viewers);
|
Player.getTitle(song_title, viewers);
|
||||||
});
|
});
|
||||||
|
|
||||||
if(/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream){
|
Chat.setup_chat_listener(chan);
|
||||||
document.getElementById("search").blur();
|
Chat.allchat_listener();
|
||||||
Player.readyLooks();
|
if(!window.mobilecheck()) Hostcontroller.host_listener();
|
||||||
}else{
|
window.onYouTubeIframeAPIReady = Player.onYouTubeIframeAPIReady;
|
||||||
Chat.setup_chat_listener(chan);
|
Player.loadPlayer();
|
||||||
Chat.allchat_listener();
|
|
||||||
if(!window.mobilecheck()) Hostcontroller.host_listener();
|
|
||||||
window.onYouTubeIframeAPIReady = Player.onYouTubeIframeAPIReady;
|
|
||||||
Player.loadPlayer();
|
|
||||||
|
|
||||||
$("#chat-btn").sideNav({
|
if(!Helper.msieversion()) Notification.requestPermission();
|
||||||
menuWidth: 272, // Default is 240
|
|
||||||
edge: 'left', // Choose the horizontal origin
|
git_info = $.ajax({ type: "GET",
|
||||||
closeOnClick: false // Closes side-nav on <a> clicks, useful for Angular/Meteor
|
url: "https://api.github.com/repos/zoff-music/zoff/commits",
|
||||||
});
|
async: false
|
||||||
|
}).responseText;
|
||||||
|
|
||||||
if($(".drag-target").length > 0) $(".drag-target")[1].remove();
|
git_info = $.parseJSON(git_info);
|
||||||
|
$("#latest-commit").html("Latest Commit: <br>"
|
||||||
|
+ git_info[0].commit.author.date.substring(0,10)
|
||||||
|
+ ": " + git_info[0].committer.login
|
||||||
|
+ "<br><a href='"+git_info[0].html_url+"'>"
|
||||||
|
+ git_info[0].sha.substring(0,10) + "</a>: "
|
||||||
|
+ git_info[0].commit.message+"<br");
|
||||||
|
|
||||||
if(!Helper.msieversion()) Notification.requestPermission();
|
Helper.sample();
|
||||||
|
|
||||||
git_info = $.ajax({ type: "GET",
|
|
||||||
url: "https://api.github.com/repos/zoff-music/zoff/commits",
|
|
||||||
async: false
|
|
||||||
}).responseText;
|
|
||||||
|
|
||||||
git_info = $.parseJSON(git_info);
|
|
||||||
$("#latest-commit").html("Latest Commit: <br>"
|
|
||||||
+ git_info[0].commit.author.date.substring(0,10)
|
|
||||||
+ ": " + git_info[0].committer.login
|
|
||||||
+ "<br><a href='"+git_info[0].html_url+"'>"
|
|
||||||
+ git_info[0].sha.substring(0,10) + "</a>: "
|
|
||||||
+ git_info[0].commit.message+"<br");
|
|
||||||
|
|
||||||
Helper.sample();
|
|
||||||
}
|
|
||||||
|
|
||||||
$( "#results" ).hover( function() { $("div.result").removeClass("hoverResults"); i = 0; }, function(){ });
|
$( "#results" ).hover( function() { $("div.result").removeClass("hoverResults"); i = 0; }, function(){ });
|
||||||
$("#search").focus();
|
$("#search").focus();
|
||||||
@@ -332,6 +320,24 @@ $(document).on("submit", "#adminForm", function(e){
|
|||||||
Admin.pass_save();
|
Admin.pass_save();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(document).on("click", ".chat-link", function(e){
|
||||||
|
$("#chatPlaylist").css("display", "block");
|
||||||
|
$("#wrapper").css("display", "none");
|
||||||
|
$("#suggestions").css("display", "none");
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on("click", ".playlist-link", function(e){
|
||||||
|
$("#chatPlaylist").css("display", "none");
|
||||||
|
$("#wrapper").css("display", "block");
|
||||||
|
$("#suggestions").css("display", "none");
|
||||||
|
});
|
||||||
|
|
||||||
|
$(document).on("click", ".suggested-link", function(e){
|
||||||
|
$("#chatPlaylist").css("display", "none");
|
||||||
|
$("#wrapper").css("display", "none");
|
||||||
|
$("#suggestions").css("display", "block");
|
||||||
|
});
|
||||||
|
|
||||||
$(document).on("submit", "#chatForm", function(){
|
$(document).on("submit", "#chatForm", function(){
|
||||||
Chat.chat(document.getElementById("chatForm").input);
|
Chat.chat(document.getElementById("chatForm").input);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ var Playercontrols = {
|
|||||||
|
|
||||||
initYoutubeControls: function()
|
initYoutubeControls: function()
|
||||||
{
|
{
|
||||||
if(window.mobilecheck() && !/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream){
|
if(window.mobilecheck() && !window.MSStream){
|
||||||
$("#controls").appendTo("#playbar");
|
$("#controls").appendTo("#playbar");
|
||||||
}
|
}
|
||||||
Playercontrols.initControls();
|
Playercontrols.initControls();
|
||||||
@@ -55,15 +55,17 @@ var Playercontrols = {
|
|||||||
if(Player.ytplayer.getPlayerState() == 1)
|
if(Player.ytplayer.getPlayerState() == 1)
|
||||||
{
|
{
|
||||||
Player.ytplayer.pauseVideo();
|
Player.ytplayer.pauseVideo();
|
||||||
if(window.mobilecheck() && !/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream){
|
if(window.mobilecheck() && !window.MSStream){
|
||||||
document.getElementById("player").style.display = "none";
|
document.getElementById("player").style.display = "none";
|
||||||
|
$(".video-container").toggleClass("click-through");
|
||||||
$(".page-footer").toggleClass("padding-bottom-extra");
|
$(".page-footer").toggleClass("padding-bottom-extra");
|
||||||
}
|
}
|
||||||
}else if(Player.ytplayer.getPlayerState() == 2 || Player.ytplayer.getPlayerState() == 0)
|
}else if(Player.ytplayer.getPlayerState() == 2 || Player.ytplayer.getPlayerState() == 0)
|
||||||
{
|
{
|
||||||
Player.ytplayer.playVideo();
|
Player.ytplayer.playVideo();
|
||||||
if(window.mobilecheck() && !/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream){
|
if(window.mobilecheck() && !window.MSStream){
|
||||||
document.getElementById("player").style.display = "block";
|
document.getElementById("player").style.display = "block";
|
||||||
|
$(".video-container").toggleClass("click-through");
|
||||||
$(".page-footer").toggleClass("padding-bottom-extra");
|
$(".page-footer").toggleClass("padding-bottom-extra");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user