mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Changed nochan to frontpage, and made changes accordingly
This commit is contained in:
@@ -15,7 +15,7 @@ gulp.task('js', function () {
|
||||
});
|
||||
|
||||
gulp.task('embed', function () {
|
||||
gulp.src(['public/js/player.js', 'public/js/helpers.js', 'public/js/playercontrols.js', 'public/js/list.js', 'public/js/embed.js', '!public/js/nochan*', '!public/js/remotecontroller.js'])
|
||||
gulp.src(['public/js/player.js', 'public/js/helpers.js', 'public/js/playercontrols.js', 'public/js/list.js', 'public/js/embed.js', '!public/js/frontpage*', '!public/js/remotecontroller.js'])
|
||||
.pipe(uglify({
|
||||
mangle: true,
|
||||
compress: true,
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
$guid=substr(base64_encode(crc32($_SERVER['HTTP_USER_AGENT'].$_SERVER['REMOTE_ADDR'].$_SERVER['HTTP_ACCEPT_LANGUAGE'])), 0, 8);
|
||||
if(isset($_GET['chan'])) {header('Location: '.$_GET['chan']); exit;}
|
||||
$list = explode("/", htmlspecialchars(strtolower($_SERVER["REQUEST_URI"])));
|
||||
if($list[1]==""||!isset($list[1])||count($list)<=1){$list="";include('public/php/nochan.php');die();}
|
||||
if($list[1]==""||!isset($list[1])||count($list)<=1){$list="";include('public/php/frontpage.php');die();}
|
||||
else{$list=preg_replace("/[^A-Za-z0-9 ]/", '', $list[1]);include('public/php/channel.php');die();}
|
||||
?>
|
||||
|
||||
4
public/dist/embed.min.js
vendored
4
public/dist/embed.min.js
vendored
File diff suppressed because one or more lines are too long
8
public/dist/main.min.js
vendored
8
public/dist/main.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -19,7 +19,7 @@ function getCookie(cname) {
|
||||
}
|
||||
*/
|
||||
|
||||
var Nochan = {
|
||||
var Frontpage = {
|
||||
|
||||
blob_list: [],
|
||||
|
||||
@@ -37,9 +37,9 @@ var Nochan = {
|
||||
Helper.log(msg);
|
||||
Helper.log("------------");
|
||||
|
||||
Nochan.populate_channels(msg.channels);
|
||||
Frontpage.populate_channels(msg.channels);
|
||||
|
||||
Nochan.set_viewers(msg.viewers);
|
||||
Frontpage.set_viewers(msg.viewers);
|
||||
},
|
||||
|
||||
populate_channels: function(lists)
|
||||
@@ -50,7 +50,7 @@ var Nochan = {
|
||||
if(lists[0].pinned == 1){
|
||||
pinned = lists.shift();
|
||||
}
|
||||
lists.sort(Nochan.sortFunction);
|
||||
lists.sort(Frontpage.sortFunction);
|
||||
if(pinned !== undefined){
|
||||
lists.unshift(pinned);
|
||||
}
|
||||
@@ -61,7 +61,7 @@ var Nochan = {
|
||||
Helper.log("-------------");
|
||||
|
||||
if(!Helper.mobilecheck())
|
||||
Nochan.add_backdrop(lists, 0);
|
||||
Frontpage.add_backdrop(lists, 0);
|
||||
|
||||
for(var x in lists)
|
||||
{
|
||||
@@ -141,11 +141,11 @@ var Nochan = {
|
||||
|
||||
var id = list[i].id;
|
||||
|
||||
if(Nochan.blob_list[i] !== undefined){
|
||||
if(Frontpage.blob_list[i] !== undefined){
|
||||
//$(".room-namer").css("opacity", 0);
|
||||
setTimeout(function(){
|
||||
if(frontpage){
|
||||
$("#mega-background").css("background", "url(data:image/png;base64,"+Nochan.blob_list[i]+")");
|
||||
$("#mega-background").css("background", "url(data:image/png;base64,"+Frontpage.blob_list[i]+")");
|
||||
$("#mega-background").css("background-size" , "200%");
|
||||
$("#mega-background").css("opacity", 1);
|
||||
$("#searchFrontpage").attr("placeholder", list[i].channel);
|
||||
@@ -162,7 +162,7 @@ var Nochan = {
|
||||
data: {id:id},
|
||||
url: "/public/php/imageblob.php",
|
||||
success: function(data){
|
||||
Nochan.blob_list.push(data);
|
||||
Frontpage.blob_list.push(data);
|
||||
//data will contain the vote count echoed by the controller i.e.
|
||||
//$(".room-namer").css("opacity", 0);
|
||||
setTimeout(function(){
|
||||
@@ -187,13 +187,13 @@ var Nochan = {
|
||||
|
||||
}
|
||||
rotation_timeout = setTimeout(function(){
|
||||
if(Nochan.times_rotated == 50 && frontpage){
|
||||
Nochan.times_rotated = 0;
|
||||
if(Frontpage.times_rotated == 50 && frontpage){
|
||||
Frontpage.times_rotated = 0;
|
||||
i = 0;
|
||||
socket.emit("frontpage_lists");
|
||||
}else if(frontpage){
|
||||
Nochan.times_rotated += 1;
|
||||
Nochan.add_backdrop(list, i+1);
|
||||
Frontpage.times_rotated += 1;
|
||||
Frontpage.add_backdrop(list, i+1);
|
||||
}
|
||||
},6000);
|
||||
|
||||
@@ -210,8 +210,8 @@ var Nochan = {
|
||||
snow.style.left = x+"px";
|
||||
snow.style.top = "0px";
|
||||
parent.appendChild(snow);
|
||||
Nochan.fall_snow(snow);
|
||||
Nochan.start_snowfall();
|
||||
Frontpage.fall_snow(snow);
|
||||
Frontpage.start_snowfall();
|
||||
}, 800);
|
||||
},
|
||||
|
||||
@@ -219,7 +219,7 @@ var Nochan = {
|
||||
corn.style.top = (parseInt(corn.style.top.replace("px", ""))+2)+"px";
|
||||
if(parseInt(corn.style.top.replace("px", "")) < document.getElementById("mega-background").offsetHeight-2.5){
|
||||
setTimeout(function(){
|
||||
Nochan.fall_snow(corn);
|
||||
Frontpage.fall_snow(corn);
|
||||
},50);
|
||||
}else{
|
||||
corn.remove();
|
||||
@@ -315,7 +315,7 @@ function share_link_modifier_frontpage(){
|
||||
function initfp(){
|
||||
|
||||
var date = new Date();
|
||||
Nochan.blob_list = [];
|
||||
Frontpage.blob_list = [];
|
||||
if(date.getMonth() == 3 && date.getDate() == 1){
|
||||
$(".mega").css("-webkit-transform", "rotate(180deg)");
|
||||
$(".mega").css("-moz-transform", "rotate(180deg)");
|
||||
@@ -327,7 +327,7 @@ function initfp(){
|
||||
var url_split = window.location.href.split("/");
|
||||
|
||||
if(url_split[3] !== "" && url_split[3].substring(0,1) != "#"){
|
||||
Nochan.to_channel(url_split[3], true);
|
||||
Frontpage.to_channel(url_split[3], true);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -375,9 +375,9 @@ function initfp(){
|
||||
window.location.href = 'http://etys.no';
|
||||
});
|
||||
|
||||
if(!Helper.mobilecheck() && Nochan.winter) {
|
||||
if(!Helper.mobilecheck() && Frontpage.winter) {
|
||||
$(".mega").prepend('<div id="snow"></div>');
|
||||
//Nochan.start_snowfall();
|
||||
//Frontpage.start_snowfall();
|
||||
}
|
||||
|
||||
window['__onGCastApiAvailable'] = function(loaded, errorInfo) {
|
||||
@@ -438,7 +438,7 @@ function setup_list_listener(){
|
||||
|
||||
function setup_playlist_listener(){
|
||||
Helper.log("Setting up playlist_listener");
|
||||
socket.on('playlists', Nochan.frontpage_function);
|
||||
socket.on('playlists', Frontpage.frontpage_function);
|
||||
}
|
||||
|
||||
function setup_host_initialization(){
|
||||
@@ -636,25 +636,25 @@ $(document).on('input', '#color_embed', function(){
|
||||
|
||||
$(document).on('click', ".chan-link", function(e){
|
||||
e.preventDefault();
|
||||
Nochan.to_channel($(this).attr("href"), false);
|
||||
Frontpage.to_channel($(this).attr("href"), false);
|
||||
});
|
||||
|
||||
$(document).on("click", ".listen-button", function(e){
|
||||
if($(".room-namer").val() === ""){
|
||||
e.preventDefault();
|
||||
Nochan.to_channel($(".room-namer").attr("placeholder"));
|
||||
Frontpage.to_channel($(".room-namer").attr("placeholder"));
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on("submit", ".channel-finder", function(e){
|
||||
e.preventDefault();
|
||||
Nochan.to_channel($(".room-namer").val());
|
||||
Frontpage.to_channel($(".room-namer").val());
|
||||
return false;
|
||||
});
|
||||
|
||||
$(document).on("submit", ".channel-finder-mobile", function(e){
|
||||
e.preventDefault();
|
||||
Nochan.to_channel($("#search-mobile").val());
|
||||
Frontpage.to_channel($("#search-mobile").val());
|
||||
return false;
|
||||
});
|
||||
|
||||
@@ -1033,7 +1033,7 @@ $(document).on("click", ".brand-logo-navigate", function(e){
|
||||
});
|
||||
|
||||
$(document).on("click", "#player_bottom_overlay", function(){
|
||||
Nochan.to_channel(chan.toLowerCase(), false);
|
||||
Frontpage.to_channel(chan.toLowerCase(), false);
|
||||
});
|
||||
|
||||
$(document).on("mousemove", "#playlist", function(e)
|
||||
@@ -1160,7 +1160,7 @@ function onepage_load(){
|
||||
$("#embed-button").css("display", "none");
|
||||
|
||||
$.ajax({
|
||||
url: "public/php/nochan.php",
|
||||
url: "public/php/frontpage.php",
|
||||
success: function(e){
|
||||
|
||||
if(Helper.mobilecheck()) {
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
</a>
|
||||
<a href="//zoff.no" class="brand-logo hide-on-med-and-up">Zöff</a>
|
||||
<ul id="nav-mobile" class="right hide-on-med-and-down">
|
||||
<li><a class="waves-effect waves-green" title="Remote control a Zöff player" href="https://remote.zoff.no">Remote</a></li>
|
||||
<li><a class="modal-trigger waves-effect waves-red" title="Need help with the site?" onclick="$('#help').openModal()">Help</a></li>
|
||||
<li><a class="waves-effect green" title="Remote control a Zöff player" href="https://remote.zoff.no">Remote</a></li>
|
||||
<li><a class="modal-trigger waves-effect waves-orange" onclick="$('#about').openModal()">About</a></li>
|
||||
<li><a class="modal-trigger waves-effect waves-yellow" onclick="$('#legal').openModal()">Legal</a></li>
|
||||
<li><a class="waves-effect waves-purple" href="https://github.com/zoff-music/">GitHub</a></li>
|
||||
|
||||
@@ -22,8 +22,8 @@ if(isset($_GET['chan'])){
|
||||
<span id="frontpage-viewer-counter" class="hide-on-small-only noselect" title="Divided among all channels. Hidden or not"></span>
|
||||
<!--<a href="//zoff.no" class="brand-logo brand-mobile hide-on-med-and-up">Zöff</a>-->
|
||||
<ul id="nav-mobile" class="right hide-on-med-and-down">
|
||||
<li><a class="waves-effect waves-green" title="Remote control a Zöff player" href="https://remote.zoff.no">Remote</a></li>
|
||||
<li><a class="modal-trigger waves-effect waves-red" title="Need help with the site?" onclick="$('#help').openModal()">Help</a></li>
|
||||
<li><a class="waves-effect green" title="Remote control a Zöff player" href="https://remote.zoff.no">Remote</a></li>
|
||||
<li><a class="modal-trigger waves-effect waves-orange" onclick="$('#about').openModal()">About</a></li>
|
||||
<li><a class="modal-trigger waves-effect waves-yellow" onclick="$('#legal').openModal()">Legal</a></li>
|
||||
<li><a class="waves-effect waves-purple" href="https://github.com/zoff-music/">GitHub</a></li>
|
||||
Reference in New Issue
Block a user