mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Removed some obsolete code
This commit is contained in:
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
2
static/dist/main.min.js
vendored
2
static/dist/main.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -5,7 +5,6 @@ var showToggle = true;
|
|||||||
var list_html = $("#list-song-html").html();
|
var list_html = $("#list-song-html").html();
|
||||||
var blink_interval_exists = false;
|
var blink_interval_exists = false;
|
||||||
var unseen = false;
|
var unseen = false;
|
||||||
//var timer = 0;
|
|
||||||
var api_key = "***REMOVED***";
|
var api_key = "***REMOVED***";
|
||||||
var searching = false
|
var searching = false
|
||||||
var time_regex = /P((([0-9]*\.?[0-9]*)Y)?(([0-9]*\.?[0-9]*)M)?(([0-9]*\.?[0-9]*)W)?(([0-9]*\.?[0-9]*)D)?)?(T(([0-9]*\.?[0-9]*)H)?(([0-9]*\.?[0-9]*)M)?(([0-9]*\.?[0-9]*)S)?)?/
|
var time_regex = /P((([0-9]*\.?[0-9]*)Y)?(([0-9]*\.?[0-9]*)M)?(([0-9]*\.?[0-9]*)W)?(([0-9]*\.?[0-9]*)D)?)?(T(([0-9]*\.?[0-9]*)H)?(([0-9]*\.?[0-9]*)M)?(([0-9]*\.?[0-9]*)S)?)?/
|
||||||
@@ -56,19 +55,6 @@ var connection_options = {
|
|||||||
var fromFront = false;
|
var fromFront = false;
|
||||||
var fromChannel = false;
|
var fromChannel = false;
|
||||||
|
|
||||||
/*
|
|
||||||
if (navigator.serviceWorker) {
|
|
||||||
navigator.serviceWorker.register('/service-worker.js', {scope: '/'})
|
|
||||||
.then(function (registration) {
|
|
||||||
console.log(registration);
|
|
||||||
})
|
|
||||||
.catch(function (e) {
|
|
||||||
console.error(e);
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
console.log('Service Worker is not supported in this browser.');
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
$().ready(function(){
|
$().ready(function(){
|
||||||
if(!fromFront && window.location.pathname != "/") init();
|
if(!fromFront && window.location.pathname != "/") init();
|
||||||
else if(!fromChannel && window.location.pathname == "/"){
|
else if(!fromChannel && window.location.pathname == "/"){
|
||||||
@@ -106,15 +92,8 @@ function init(){
|
|||||||
|
|
||||||
if(window.location.hostname == "zoff.no") add = "https://zoff.no";
|
if(window.location.hostname == "zoff.no") add = "https://zoff.no";
|
||||||
else add = window.location.hostname;
|
else add = window.location.hostname;
|
||||||
|
|
||||||
|
|
||||||
//setTimeout(function(){
|
|
||||||
if(Player != undefined) Player.stopInterval= false;
|
if(Player != undefined) Player.stopInterval= false;
|
||||||
//window.vote = List.vote;
|
|
||||||
//window.submit = Search.submit;
|
|
||||||
//window.submitAndClose = Search.submitAndClose;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$('ul.playlist-tabs').tabs();
|
$('ul.playlist-tabs').tabs();
|
||||||
$('ul.playlist-tabs-loggedIn').tabs();
|
$('ul.playlist-tabs-loggedIn').tabs();
|
||||||
@@ -142,15 +121,6 @@ function init(){
|
|||||||
handles: "e",
|
handles: "e",
|
||||||
minWidth: 350
|
minWidth: 350
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
|
||||||
if(localStorage[chan.toLowerCase()])
|
|
||||||
{
|
|
||||||
if(localStorage[chan.toLowerCase()].length != 64)
|
|
||||||
localStorage.removeItem(chan.toLowerCase());
|
|
||||||
else
|
|
||||||
socket.emit("password", [localStorage[chan.toLowerCase()], chan.toLowerCase()]);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
if(socket == undefined || Helper.mobilecheck()){
|
if(socket == undefined || Helper.mobilecheck()){
|
||||||
no_socket = false;
|
no_socket = false;
|
||||||
@@ -202,15 +172,6 @@ function init(){
|
|||||||
|
|
||||||
$( "#results" ).hover( function() { $("div.result").removeClass("hoverResults"); i = 0; }, function(){ });
|
$( "#results" ).hover( function() { $("div.result").removeClass("hoverResults"); i = 0; }, function(){ });
|
||||||
$("#search").focus();
|
$("#search").focus();
|
||||||
|
|
||||||
/*setInterval(function(){
|
|
||||||
timer--;
|
|
||||||
if(timer===0){
|
|
||||||
Search.search($(".search_input").val());
|
|
||||||
}
|
|
||||||
}, 1);*/
|
|
||||||
//}, 1000);
|
|
||||||
|
|
||||||
$("#embed-button").css("display", "inline-block");
|
$("#embed-button").css("display", "inline-block");
|
||||||
$("#embed-area").val('<embed src="https://zoff.no/embed.html#' + chan.toLowerCase() + '&autplay" width="600px" height="300px">');
|
$("#embed-area").val('<embed src="https://zoff.no/embed.html#' + chan.toLowerCase() + '&autplay" width="600px" height="300px">');
|
||||||
$("#search").attr("placeholder", "Find song on YouTube...");
|
$("#search").attr("placeholder", "Find song on YouTube...");
|
||||||
@@ -317,16 +278,12 @@ $(document).on('click', "#aprilfools", function(){
|
|||||||
|
|
||||||
$(document).on('click', ".chan-link", function(e){
|
$(document).on('click', ".chan-link", function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
Nochan.to_channel($(this).attr("href"), false);
|
Nochan.to_channel($(this).attr("href"), false);
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on("click", ".listen-button", function(e){
|
$(document).on("click", ".listen-button", function(e){
|
||||||
//console.log($(".room-namer").attr("placeholder"));
|
|
||||||
if($(".room-namer").val() == ""){
|
if($(".room-namer").val() == ""){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
//window.location = "?chan="+
|
|
||||||
|
|
||||||
Nochan.to_channel($(".room-namer").attr("placeholder"));
|
Nochan.to_channel($(".room-namer").attr("placeholder"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -398,7 +355,6 @@ $(document).on("submit", "#remoteform", function(e) {
|
|||||||
|
|
||||||
$(document).on("click", "#chat-btn", function(){
|
$(document).on("click", "#chat-btn", function(){
|
||||||
$("#text-chat-input").focus();
|
$("#text-chat-input").focus();
|
||||||
//$("#chat-btn").css("color", "white");
|
|
||||||
$("#chat-btn i").css("opacity", 1);
|
$("#chat-btn i").css("opacity", 1);
|
||||||
clearInterval(blink_interval);
|
clearInterval(blink_interval);
|
||||||
blink_interval_exists = false;
|
blink_interval_exists = false;
|
||||||
@@ -601,7 +557,7 @@ $(document).on("mousemove", "#playlist", function(e)
|
|||||||
Helper.addClass("#bottom-button", "hide");
|
Helper.addClass("#bottom-button", "hide");
|
||||||
Helper.addClass("#top-button", "hide");
|
Helper.addClass("#top-button", "hide");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on("mouseleave", "#playlist", function(){
|
$(document).on("mouseleave", "#playlist", function(){
|
||||||
Helper.addClass("#bottom-button", "hide");
|
Helper.addClass("#bottom-button", "hide");
|
||||||
@@ -649,16 +605,14 @@ function onepage_load(){
|
|||||||
durationBegun = false;
|
durationBegun = false;
|
||||||
$("#embed-button").css("display", "none");
|
$("#embed-button").css("display", "none");
|
||||||
|
|
||||||
|
|
||||||
if(Helper.mobilecheck()) socket.removeAllListeners();
|
|
||||||
//$("#player").appendTo("#frontpage_player");
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "php/nochan.php",
|
url: "php/nochan.php",
|
||||||
success: function(e){
|
success: function(e){
|
||||||
|
|
||||||
if(Helper.mobilecheck()) socket.disconnect();
|
if(Helper.mobilecheck()) {
|
||||||
else {
|
socket.removeAllListeners();
|
||||||
|
socket.disconnect();
|
||||||
|
} else {
|
||||||
socket.removeEventListener("chat.all");
|
socket.removeEventListener("chat.all");
|
||||||
socket.removeEventListener("chat");
|
socket.removeEventListener("chat");
|
||||||
socket.removeEventListener("conf");
|
socket.removeEventListener("conf");
|
||||||
@@ -680,12 +634,7 @@ function onepage_load(){
|
|||||||
$("meta[name=theme-color]").attr("content", "#2D2D2D");
|
$("meta[name=theme-color]").attr("content", "#2D2D2D");
|
||||||
|
|
||||||
if(!Helper.mobilecheck()){
|
if(!Helper.mobilecheck()){
|
||||||
/*$("<a id='closePlayer'>X</a>").appendTo("#frontpage_player");
|
|
||||||
$("#player").appendTo("#frontpage_player");
|
|
||||||
Player.onYouTubeIframeAPIReady();*/
|
|
||||||
$("main").append("<a id='closePlayer'>X</a>");
|
$("main").append("<a id='closePlayer'>X</a>");
|
||||||
/*$("#player_overlay").remove();
|
|
||||||
$("#controls").remove();*/
|
|
||||||
$("#playbar").remove();
|
$("#playbar").remove();
|
||||||
$("#playlist").remove();
|
$("#playlist").remove();
|
||||||
$(".ui-resizable-handle").remove();
|
$(".ui-resizable-handle").remove();
|
||||||
@@ -695,7 +644,6 @@ function onepage_load(){
|
|||||||
$("#player").css("opacity", "1");
|
$("#player").css("opacity", "1");
|
||||||
$("#video-container").removeClass("no-opacity");
|
$("#video-container").removeClass("no-opacity");
|
||||||
} else {
|
} else {
|
||||||
console.log("destroying video");
|
|
||||||
Player.ytplayer.destroy();
|
Player.ytplayer.destroy();
|
||||||
Player.ytplayer = "";
|
Player.ytplayer = "";
|
||||||
}
|
}
|
||||||
@@ -719,7 +667,6 @@ function onepage_load(){
|
|||||||
}else {
|
}else {
|
||||||
fromChannel = true;
|
fromChannel = true;
|
||||||
frontpage = true;
|
frontpage = true;
|
||||||
|
|
||||||
initfp();
|
initfp();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user