Renaming and fixing some filestructure
2
.gitignore
vendored
@@ -1,4 +1,4 @@
|
||||
static/images/thumbnails/
|
||||
public/images/thumbnails/
|
||||
node_modules/
|
||||
scripts/
|
||||
.DS_Store
|
||||
|
||||
23
.htaccess
@@ -10,24 +10,31 @@ RewriteCond %{HTTPS} !=on
|
||||
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [L]
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^remote.zoff.no
|
||||
RewriteCond %{REQUEST_URI} !/static
|
||||
RewriteRule ^(.*)$ php/controller.php [L,NC,QSA]
|
||||
#RewriteCond %{REQUEST_URI} !/public
|
||||
RewriteRule ^(.*)$ /public/php/controller.php [L,NC,QSA]
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^bot.zoff.no
|
||||
RewriteCond %{REQUEST_URI} !/static
|
||||
RewriteRule ^(.*)$ php/bot.php [L,NC,QSA]
|
||||
#RewriteCond %{REQUEST_URI} !/public
|
||||
RewriteRule ^(.*)$ /public/php/bot.php [L,NC,QSA]
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^zoff.no
|
||||
RewriteCond %{REQUEST_URI} /o_callback
|
||||
RewriteRule ^(.*)$ php/callback.html [L,NC,QSA]
|
||||
RewriteRule ^(.*)$ public/html/callback.html [L,NC,QSA]
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^zoff.no
|
||||
RewriteCond %{REQUEST_URI} /_embed
|
||||
RewriteRule ^(.*)$ public/html/embed.html [L,NC,QSA]
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^localhost
|
||||
RewriteCond %{REQUEST_URI} /o_callback
|
||||
RewriteRule ^(.*)$ php/callback.html [L,NC,QSA]
|
||||
RewriteRule ^(.*)$ /public/html/callback.html [L,NC,QSA]
|
||||
|
||||
RewriteCond %{HTTP_HOST} ^localhost
|
||||
RewriteCond %{REQUEST_URI} /_embed
|
||||
RewriteRule ^(.*)$ /public/html/embed.html [L,NC,QSA]
|
||||
|
||||
#RewriteRule (?i)^remote/(.*) php/controller.php?id=$1 [L]
|
||||
#RewriteRule (?i)^remote php/controller.php [L]
|
||||
#RewriteRule (?i)^remote/(.*) /public/php/controller.php?id=$1 [L]
|
||||
#RewriteRule (?i)^remote /public/php/controller.php [L]
|
||||
|
||||
RewriteCond %{REQUEST_URI} !(/$|\.)
|
||||
RewriteRule (.*) %{REQUEST_URI}/ [R=301,L]
|
||||
|
||||
30
gulpfile.js
@@ -4,65 +4,65 @@ var gulp = require('gulp'),
|
||||
concat = require('gulp-concat');
|
||||
|
||||
gulp.task('js', function () {
|
||||
gulp.src(['static/js/*.js', '!static/js/embed*', '!static/js/remotecontroller.js', '!static/js/callback.js'])
|
||||
gulp.src(['public/js/*.js', '!public/js/embed*', '!public/js/remotecontroller.js', '!public/js/callback.js'])
|
||||
.pipe(uglify({
|
||||
mangle: true,
|
||||
compress: true,
|
||||
enclose: true
|
||||
}))
|
||||
.pipe(concat('main.min.js'))
|
||||
.pipe(gulp.dest('static/dist'));
|
||||
.pipe(gulp.dest('public/dist'));
|
||||
});
|
||||
|
||||
gulp.task('embed', function () {
|
||||
gulp.src(['static/js/player.js', 'static/js/helpers.js', 'static/js/playercontrols.js', 'static/js/list.js', 'static/js/embed.js', '!static/js/nochan*', '!static/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/nochan*', '!public/js/remotecontroller.js'])
|
||||
.pipe(uglify({
|
||||
mangle: true,
|
||||
compress: true,
|
||||
enclose: true
|
||||
}))
|
||||
.pipe(concat('embed.min.js'))
|
||||
.pipe(gulp.dest('static/dist'));
|
||||
.pipe(gulp.dest('public/dist'));
|
||||
});
|
||||
|
||||
gulp.task('callback', function () {
|
||||
gulp.src(['static/js/callback.js'])
|
||||
gulp.src(['public/js/callback.js'])
|
||||
.pipe(uglify({
|
||||
mangle: true,
|
||||
compress: true,
|
||||
enclose: true
|
||||
}))
|
||||
.pipe(concat('callback.min.js'))
|
||||
.pipe(gulp.dest('static/dist'));
|
||||
.pipe(gulp.dest('public/dist'));
|
||||
});
|
||||
|
||||
/*
|
||||
gulp.task('nochan', function () {
|
||||
gulp.src(['static/js/nochan.js', 'static/js/helpers.js'])
|
||||
gulp.src(['public/js/nochan.js', 'public/js/helpers.js'])
|
||||
.pipe(uglify({
|
||||
mangle: true,
|
||||
compress: true,
|
||||
enclose: true
|
||||
}))
|
||||
.pipe(concat('frontpage.min.js'))
|
||||
.pipe(gulp.dest('static/dist'));
|
||||
.pipe(gulp.dest('public/dist'));
|
||||
});*/
|
||||
|
||||
gulp.task('remotecontroller', function () {
|
||||
gulp.src(['static/js/remotecontroller.js'])
|
||||
gulp.src(['public/js/remotecontroller.js'])
|
||||
.pipe(uglify({
|
||||
mangle: true,
|
||||
compress: true,
|
||||
enclose: true
|
||||
}))
|
||||
.pipe(concat('remote.min.js'))
|
||||
.pipe(gulp.dest('static/dist'));
|
||||
.pipe(gulp.dest('public/dist'));
|
||||
});
|
||||
|
||||
gulp.task('default', function(){
|
||||
gulp.watch('static/js/*.js', ['js']);
|
||||
gulp.watch('static/js/*.js', ['embed']);
|
||||
gulp.watch(['static/js/callback.js', 'static/js/helpers.js'], ['callback']);
|
||||
//gulp.watch('static/js/*.js', ['nochan']);
|
||||
gulp.watch('static/js/remotecontroller.js', ['remotecontroller']);
|
||||
gulp.watch('public/js/*.js', ['js']);
|
||||
gulp.watch('public/js/*.js', ['embed']);
|
||||
gulp.watch(['public/js/callback.js', 'public/js/helpers.js'], ['callback']);
|
||||
//gulp.watch('public/js/*.js', ['nochan']);
|
||||
gulp.watch('public/js/remotecontroller.js', ['remotecontroller']);
|
||||
});
|
||||
|
||||
302
index.php
Executable file → Normal file
@@ -3,304 +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('php/nochan.php');die();}
|
||||
else $list=preg_replace("/[^A-Za-z0-9 ]/", '', $list[1]);
|
||||
if($list[1]==""||!isset($list[1])||count($list)<=1){$list="";include('public/php/nochan.php');die();}
|
||||
else{$list=preg_replace("/[^A-Za-z0-9 ]/", '', $list[1]);include('public/php/channel.php');die();}
|
||||
?>
|
||||
<html lang="en">
|
||||
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<?php include("php/header.php"); ?>
|
||||
<script type="text/javascript" src="/static/dist/main.min.js"></script>
|
||||
</head>
|
||||
<body id="channelpage" class="noselect cursor-default">
|
||||
<header>
|
||||
<div class="navbar-fixed">
|
||||
<nav id="nav">
|
||||
<div class="nav-wrapper">
|
||||
<a href="/" class="brand-logo brand-logo-navigate hide-on-med-and-down noselect">
|
||||
<img id="zicon" src="static/images/squareicon_small.png" alt="zöff" title="Zöff" />
|
||||
</a>
|
||||
<div class="brand-logo truncate zbrand">
|
||||
<a href="/" class="hide-on-large-only brand-logo-navigate">Zöff</a>
|
||||
<span class="hide-on-large-only">/</span>
|
||||
<span id="chan" class="chan clickable" title="Show big URL"><?php echo(ucfirst($list));?></span>
|
||||
</div>
|
||||
|
||||
<ul class="title-container">
|
||||
<li class="song-title cursor-pointer truncate" id="song-title">
|
||||
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" />
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="right control-list noselect">
|
||||
<li id="search_loader" class="valign-wrapper hide">
|
||||
<div class="valign">
|
||||
<div class="preloader-wrapper small active">
|
||||
<div class="spinner-layer spinner-blue">
|
||||
<div class="circle-clipper left">
|
||||
<div class="circle"></div>
|
||||
</div><div class="gap-patch">
|
||||
<div class="circle"></div>
|
||||
</div><div class="circle-clipper right">
|
||||
<div class="circle"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="spinner-layer spinner-red">
|
||||
<div class="circle-clipper left">
|
||||
<div class="circle"></div>
|
||||
</div><div class="gap-patch">
|
||||
<div class="circle"></div>
|
||||
</div><div class="circle-clipper right">
|
||||
<div class="circle"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="spinner-layer spinner-yellow">
|
||||
<div class="circle-clipper left">
|
||||
<div class="circle"></div>
|
||||
</div><div class="gap-patch">
|
||||
<div class="circle"></div>
|
||||
</div><div class="circle-clipper right">
|
||||
<div class="circle"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="spinner-layer spinner-green">
|
||||
<div class="circle-clipper left">
|
||||
<div class="circle"></div>
|
||||
</div><div class="gap-patch">
|
||||
<div class="circle"></div>
|
||||
</div><div class="circle-clipper right">
|
||||
<div class="circle"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a class="nav-btn" href="#find" id="search-btn">
|
||||
<i class="mdi-action-search"></i>
|
||||
<span class="hover-text">Find</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="nav-btn" href="#skip" id="skip">
|
||||
<i class="mdi-av-skip-next"></i>
|
||||
<span class="hover-text">Skip</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="nav-btn hide-on-small-only" href="#stir" id="shuffle">
|
||||
<i class="mdi-av-shuffle"></i>
|
||||
<span class="hover-text">Stir</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="nav-btn" href="#settings" data-activates="settings-bar" id="settings">
|
||||
<i class="mdi-image-dehaze"></i>
|
||||
<span class="hover-text">Conf</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="side-nav" id="settings-bar">
|
||||
<?php include("php/panel.php");?>
|
||||
</ul>
|
||||
<div id="results" class="search_results hide">
|
||||
<div id="temp-results-container">
|
||||
<div id="temp-results" class="result-object">
|
||||
<div id="result" class="result">
|
||||
<img class="thumb" src="/static/images/loading.png" alt="Thumb"/>
|
||||
|
||||
<div class="search-title truncate"></div>
|
||||
<span class="result_info"></span>
|
||||
|
||||
<div class="waves-effect waves-orange btn-flat" id="add-many" title="Add several videos">
|
||||
<i class="mdi-av-playlist-add"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="empty-results-container">
|
||||
<div id='empty-results' class='valign-wrapper'>
|
||||
<span class='valign'>No results found..</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
<div id="help" class="modal">
|
||||
<div class="modal-content">
|
||||
<h4>So you need help?</h4>
|
||||
<p>When listening on a channel, there are some different buttons you can click.</p>
|
||||
<p>If you click the cogwheel, you'll open the settings panel. Here you can change channel settings, decide if you want the computer you're on can be remote-controlled, and import playlists from YouTube.</p>
|
||||
<p>The search-icon, opens up a search inputfield. If you start typing here, the site will automagically search for your input!</p>
|
||||
<p>If you click the button next to the search icon, you'll skip on a song. The one next to that one, is shuffleling of the list. Next one there again is to open the chat.</p>
|
||||
<p>Clicking a song in the playlist, gives it a vote. If you're logged in, you'll have a delete button at your disposal.</p>
|
||||
<p>Also, whenever you're logged in, you'll have two tabs in the top of the playlist thats called "Playlist" and "Suggested". The playlist obviously shows the playlist. But the suggested tab, shows 5 songs that YouTube recommends based on the current song. There might also be user recommended songs. To add any of these, just click them as you'd click a song to vote.</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#!" class=" modal-action modal-close waves-effect waves-green btn-flat">Close</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="embed" class="modal">
|
||||
<div class="modal-content">
|
||||
<h4>Embed code</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 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="color" id="color_embed" class="settings_embed" value="#808080" />
|
||||
</p>
|
||||
<textarea id="embed-area"></textarea>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#!" class=" modal-action modal-close waves-effect waves-green btn-flat">Close</a>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div id="channel-load" class="progress">
|
||||
<div class="indeterminate" id="channel-load-move"></div>
|
||||
</div>
|
||||
<main class="container center-align main">
|
||||
<div id="main-row" class="row">
|
||||
<div id="video-container" class="col s12 m9 video-container no-opacity click-through">
|
||||
<!--
|
||||
width: calc(100% - 261px);
|
||||
display: inline;
|
||||
-->
|
||||
<div id="player" class="ytplayer"></div>
|
||||
<div id="main_components">
|
||||
<div id="player_overlay" class="hide valign-wrapper">
|
||||
<div id="playing_on"><div id="chromecast_icon">
|
||||
<i class="mdi-hardware-cast-connected"></i>
|
||||
</div>
|
||||
<div id="chromecast_text"></div>
|
||||
</div>
|
||||
<div id="player_overlay_text" class="valign center-align">
|
||||
Waiting for Video
|
||||
</div>
|
||||
<div id="player_overlay_controls" class="hide valign-wrapper">
|
||||
<div id="playpause-overlay" class="valign center-align">
|
||||
<i id="play-overlay" class="mdi-av-play-arrow hide"></i>
|
||||
<i id="pause-overlay" class="mdi-av-pause"></i>
|
||||
</div>
|
||||
<div id="volume-button-overlay">
|
||||
<i id="v-mute-overlay" class="mdi-av-volume-off"></i>
|
||||
<i id="v-low-overlay" class="mdi-av-volume-mute"></i>
|
||||
<i id="v-medium-overlay" class="mdi-av-volume-down"></i>
|
||||
<i id="v-full-overlay" class="mdi-av-volume-up"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="controls" class="noselect">
|
||||
<div id="playpause">
|
||||
<i id="play" class="mdi-av-play-arrow hide"></i>
|
||||
<i id="pause" class="mdi-av-pause"></i>
|
||||
</div>
|
||||
<div id="duration"></div>
|
||||
<div id="fullscreen">
|
||||
<i class="mdi-navigation-fullscreen"></i>
|
||||
</div>
|
||||
<button class="castButton mdi-hardware-cast tooltipped" data-position="top" data-delay="10" data-tooltip="Cast Zöff to TV" is="google-cast-button">
|
||||
</button>
|
||||
<button class="castButton-active hide mdi-hardware-cast-connected tooltipped" data-position="top" data-delay="10" data-tooltip="Stop casting" >
|
||||
</button>
|
||||
<div id="volume-button">
|
||||
<i id="v-mute" class="mdi-av-volume-off"></i>
|
||||
<i id="v-low" class="mdi-av-volume-mute"></i>
|
||||
<i id="v-medium" class="mdi-av-volume-down"></i>
|
||||
<i id="v-full" class="mdi-av-volume-up"></i>
|
||||
</div>
|
||||
<div id="volume"></div>
|
||||
<div id="viewers"></div>
|
||||
<div id="bar"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="playlist" class="col s12 m3">
|
||||
<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>
|
||||
<ul class="tabs playlist-tabs" style="width:96%">
|
||||
<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 chat-link" href="#chat">Chat</a></li>
|
||||
</ul>
|
||||
<ul class="tabs playlist-tabs-loggedIn hide" style="width: 96%;">
|
||||
<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" class="card left-align list-song">
|
||||
<div class="clickable vote-container" title="Vote!">
|
||||
<a class="clickable center-align votebg">
|
||||
<span class="lazy card-image cardbg list-image" style="background-image:url('/static/images/loading.png');"></span>
|
||||
</a>
|
||||
<span class="card-content">
|
||||
<span class="flow-text truncate list-title"></span>
|
||||
<span class="vote-span">
|
||||
<span class="list-votes"></span>
|
||||
<span class="highlighted vote-text"> votes</span>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="card-action center-align list-remove hide">
|
||||
<a title="Remove song" id="del" class="waves-effect btn-flat clickable">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="suggestions" class="tabs_height" style="display:none;">
|
||||
<p class="suggest-title-info">YouTube Suggests:</p>
|
||||
<div class="suggest_bar" id="suggest-song-html">
|
||||
</div>
|
||||
<p class="suggest-title-info" id="user_suggests">Users Suggests:</p>
|
||||
<div class="suggest_bar" id="user-suggest-html">
|
||||
</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">
|
||||
<input id="text-chat-input" name="input" type="text" autocomplete="off" placeholder="Chat" maxlength="150" />
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="playbar">
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php include("php/footer.php"); ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"name": "Zöff",
|
||||
"icons": [
|
||||
{
|
||||
"src": "static/images/144x144.png",
|
||||
"src": "public/images/144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image/png"
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
position: absolute;
|
||||
top: -47px;
|
||||
left: 10px;
|
||||
background-image: url('static/images/squareicon_small.png');
|
||||
background-image: url('public/images/squareicon_small.png');
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background-position: center;
|
||||
@@ -1996,7 +1996,7 @@ nav ul li:hover, nav ul li.active {
|
||||
pointer-events: none;
|
||||
background: none;
|
||||
font-family: Androgyne;
|
||||
background-image: url('static/images/s1.png'), url('static/images/s2.png'), url('static/images/s3.png');
|
||||
background-image: url('public/images/s1.png'), url('public/images/s2.png'), url('public/images/s3.png');
|
||||
height: 100%;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
2
public/dist/embed.min.js
vendored
Executable file
|
Before Width: | Height: | Size: 322 KiB After Width: | Height: | Size: 322 KiB |
@@ -2,7 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Zöff OAuth Callback</title>
|
||||
<script type="text/javascript" src="/static/dist/callback.min.js"></script>
|
||||
<script type="text/javascript" src="/public/dist/callback.min.js"></script>
|
||||
<meta charset="UTF-8"/>
|
||||
</head>
|
||||
<body>
|
||||
@@ -59,6 +59,6 @@
|
||||
|
||||
window.addEventListener("message", receiveMessage, false);
|
||||
</script>
|
||||
<div id="song-title"></div><div id="container" style="display:inline-flex;"><div id="player-container"><div id="player"></div><div id="controls" class="noselect"><div id="zoffbutton" title="Visit the channel!"></div><div id="playpause"><i id="play" class="mdi-av-play-arrow hide"></i><i id="pause" class="mdi-av-pause"></i></div><div id="duration">00:00 / 00:00</div><div id="volume-button"><i id="v-mute" class="mdi-av-volume-off"></i><i id="v-low" class="mdi-av-volume-mute"></i><i id="v-medium" class="mdi-av-volume-down"></i><i id="v-full" class="mdi-av-volume-up"></i></div><div id="volume"></div><div id="viewers"></div><div id="bar"></div></div></div><div id="playlist"><div id="wrapper"><div id="preloader" class="progress channel_preloader"><div class="indeterminate"></div></div><div id="list-song-html"><div id="list-song" class="card left-align list-song"><span class="clickable vote-container" title="Vote!"><a class="clickable center-align votebg"><div class="lazy card-image cardbg list-image" style=""></div></a><span class="card-content"><span class="flow-text truncate list-title"></span><span class="vote-span"><span class="list-votes"></span><span class="highlighted vote-text"> votes</span></span></span></span></div></div></div></div></div><script type="text/javascript" src="/static/dist/lib/jquery-2.1.3.min.js"></script><script type="text/javascript" src="/static/dist/lib/jquery-ui-1.10.3.min.js"></script><script type="text/javascript" src="/static/dist/lib/socket.io-1.4.5.js"></script><script src="static/dist/embed.min.js"></script>
|
||||
<div id="song-title"></div><div id="container" style="display:inline-flex;"><div id="player-container"><div id="player"></div><div id="controls" class="noselect"><div id="zoffbutton" title="Visit the channel!"></div><div id="playpause"><i id="play" class="mdi-av-play-arrow hide"></i><i id="pause" class="mdi-av-pause"></i></div><div id="duration">00:00 / 00:00</div><div id="volume-button"><i id="v-mute" class="mdi-av-volume-off"></i><i id="v-low" class="mdi-av-volume-mute"></i><i id="v-medium" class="mdi-av-volume-down"></i><i id="v-full" class="mdi-av-volume-up"></i></div><div id="volume"></div><div id="viewers"></div><div id="bar"></div></div></div><div id="playlist"><div id="wrapper"><div id="preloader" class="progress channel_preloader"><div class="indeterminate"></div></div><div id="list-song-html"><div id="list-song" class="card left-align list-song"><span class="clickable vote-container" title="Vote!"><a class="clickable center-align votebg"><div class="lazy card-image cardbg list-image" style=""></div></a><span class="card-content"><span class="flow-text truncate list-title"></span><span class="vote-span"><span class="list-votes"></span><span class="highlighted vote-text"> votes</span></span></span></span></div></div></div></div></div><script type="text/javascript" src="/public/dist/lib/jquery-2.1.3.min.js"></script><script type="text/javascript" src="/public/dist/lib/jquery-ui-1.10.3.min.js"></script><script type="text/javascript" src="/public/dist/lib/socket.io-1.4.5.js"></script><script src="public/dist/embed.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -10,7 +10,7 @@
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="theme-color" content="#2D2D2D" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<meta property="og:image" content="/static/images/favicon.png" />
|
||||
<meta property="og:image" content="/public/images/favicon.png" />
|
||||
<meta property="og:title" content="Zöff"/>
|
||||
<meta property="og:description" content="The Shared (free) YouTube radio. Being built around the YouTube search and video API it enables the creation of collaborative and shared live playlists, with billions of videos and songs to choose from, all for free and without registration. Enjoy!"/>
|
||||
<meta property="og:type" content="website"/>
|
||||
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 697 B After Width: | Height: | Size: 697 B |
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 786 B After Width: | Height: | Size: 786 B |
|
Before Width: | Height: | Size: 299 B After Width: | Height: | Size: 299 B |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 980 B After Width: | Height: | Size: 980 B |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
@@ -35,7 +35,7 @@ var Chat = {
|
||||
|
||||
if(!blink_interval_exists && inp.msg.substring(0,1) == ":" && !chat_active)
|
||||
{
|
||||
$("#favicon").attr("href", "static/images/highlogo.png");
|
||||
$("#favicon").attr("href", "public/images/highlogo.png");
|
||||
blink_interval_exists = true;
|
||||
unseen = true;
|
||||
chat_unseen = true;
|
||||
@@ -45,7 +45,7 @@ var Chat = {
|
||||
|
||||
if(document.hidden)
|
||||
{
|
||||
$("#favicon").attr("href", "static/images/highlogo.png");
|
||||
$("#favicon").attr("href", "public/images/highlogo.png");
|
||||
}
|
||||
var color = Helper.intToARGB(Helper.hashCode(inp.from));
|
||||
if(color.length < 6) {
|
||||
@@ -65,7 +65,7 @@ var Chat = {
|
||||
{
|
||||
if(!blink_interval_exists && data.msg.substring(0,1) == ":" && !chat_active)
|
||||
{
|
||||
$("#favicon").attr("href", "static/images/highlogo.png");
|
||||
$("#favicon").attr("href", "public/images/highlogo.png");
|
||||
unseen = true;
|
||||
chat_unseen = true;
|
||||
if(!blinking) Chat.chat_blink();
|
||||
@@ -37,8 +37,8 @@ $(document).ready(function(){
|
||||
|
||||
color = "#" + hash[1];
|
||||
|
||||
$("head").append('<link type="text/css" rel="stylesheet" href="/static/css/embed.css" />');
|
||||
$("head").append('<link type="text/css" rel="stylesheet" href="/static/css/materialize.min.css" />');
|
||||
$("head").append('<link type="text/css" rel="stylesheet" href="/public/css/embed.css" />');
|
||||
$("head").append('<link type="text/css" rel="stylesheet" href="/public/css/materialize.min.css" />');
|
||||
|
||||
add = "https://zoff.no";
|
||||
socket = io.connect(''+add+':8880', connection_options);
|
||||
@@ -213,7 +213,7 @@ var Helper = {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {from: from, message: message},
|
||||
url: "/php/mail.php",
|
||||
url: "/public/php/mail.php",
|
||||
success: function(data){
|
||||
if(data == "success"){
|
||||
$("#contact-container").empty();
|
||||
@@ -724,7 +724,7 @@ $(document).on("submit", "#listImportSpotify", function(e){
|
||||
});
|
||||
|
||||
$(window).focus(function(){
|
||||
$("#favicon").attr("href", "static/images/favicon.png");
|
||||
$("#favicon").attr("href", "public/images/favicon.png");
|
||||
unseen = false;
|
||||
});
|
||||
|
||||
@@ -760,7 +760,7 @@ $(document).on("click", "#chat-btn", function(){
|
||||
clearInterval(blink_interval);
|
||||
blink_interval_exists = false;
|
||||
unseen = false;
|
||||
$("#favicon").attr("href", "static/images/favicon.png");
|
||||
$("#favicon").attr("href", "public/images/favicon.png");
|
||||
});
|
||||
|
||||
function searchTimeout(event) {
|
||||
@@ -820,7 +820,7 @@ $(document).on("click", ".chat-link", function(e){
|
||||
chat_unseen = false;
|
||||
$(".chat-link").attr("style", "color: white !important;");
|
||||
blinking = false;
|
||||
$("#favicon").attr("href", "static/images/favicon.png");
|
||||
$("#favicon").attr("href", "public/images/favicon.png");
|
||||
$("#chatPlaylist").css("display", "block");
|
||||
$("#wrapper").css("display", "none");
|
||||
$("#suggestions").css("display", "none");
|
||||
@@ -1057,7 +1057,7 @@ function onepage_load(){
|
||||
$("#embed-button").css("display", "none");
|
||||
|
||||
$.ajax({
|
||||
url: "php/nochan.php",
|
||||
url: "public/php/nochan.php",
|
||||
success: function(e){
|
||||
|
||||
if(Helper.mobilecheck()) {
|
||||
@@ -1119,7 +1119,7 @@ function onepage_load(){
|
||||
else $("main").append($($($(e)[71]).html())[0]);
|
||||
$(".page-footer").removeClass("padding-bottom-extra");
|
||||
$(".page-footer").removeClass("padding-bottom-novideo");
|
||||
$("#favicon").attr("href", "static/images/favicon.png");
|
||||
$("#favicon").attr("href", "public/images/favicon.png");
|
||||
|
||||
Helper.log(socket);
|
||||
if($("#alreadyfp").length == 1){
|
||||
@@ -154,13 +154,13 @@ var Nochan = {
|
||||
},500);
|
||||
} else {
|
||||
var img = new Image();
|
||||
img.src = "/static/images/thumbnails/"+id+".jpg";
|
||||
img.src = "/public/images/thumbnails/"+id+".jpg";
|
||||
|
||||
img.onerror = function(){ // Failed to load
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: {id:id},
|
||||
url: "/php/imageblob.php",
|
||||
url: "/public/php/imageblob.php",
|
||||
success: function(data){
|
||||
Nochan.blob_list.push(data);
|
||||
//data will contain the vote count echoed by the controller i.e.
|
||||
@@ -245,7 +245,7 @@ var Nochan = {
|
||||
}
|
||||
$("body").css("background-color", "#2d2d2d");
|
||||
$.ajax({
|
||||
url: new_channel + "/php/index.php",
|
||||
url: new_channel + "/public/php/index.php",
|
||||
|
||||
success: function(e){
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<nav id="fp-nav">
|
||||
<div class="nav-wrapper">
|
||||
<a href="//zoff.no" class="brand-logo hide-on-small-only">
|
||||
<img id="zicon" src="/static/images/squareicon_small.png" alt="zöff" title="Zöff" />
|
||||
<img id="zicon" src="/public/images/squareicon_small.png" alt="zöff" title="Zöff" />
|
||||
</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">
|
||||
@@ -88,6 +88,6 @@
|
||||
<?php include("footer.php"); ?>
|
||||
|
||||
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.3/jquery.ui.touch-punch.min.js"></script>
|
||||
<!--<script type="text/javascript" src="/static/dist/remote.min.js"></script>-->
|
||||
<!--<script type="text/javascript" src="/public/dist/remote.min.js"></script>-->
|
||||
</body>
|
||||
</html>
|
||||
298
public/php/channel.php
Executable file
@@ -0,0 +1,298 @@
|
||||
<html lang="en">
|
||||
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
|
||||
<meta name="robots" content="noindex, nofollow" />
|
||||
<?php include("public/php/header.php"); ?>
|
||||
<script type="text/javascript" src="/public/dist/main.min.js"></script>
|
||||
</head>
|
||||
<body id="channelpage" class="noselect cursor-default">
|
||||
<header>
|
||||
<div class="navbar-fixed">
|
||||
<nav id="nav">
|
||||
<div class="nav-wrapper">
|
||||
<a href="/" class="brand-logo brand-logo-navigate hide-on-med-and-down noselect">
|
||||
<img id="zicon" src="public/images/squareicon_small.png" alt="zöff" title="Zöff" />
|
||||
</a>
|
||||
<div class="brand-logo truncate zbrand">
|
||||
<a href="/" class="hide-on-large-only brand-logo-navigate">Zöff</a>
|
||||
<span class="hide-on-large-only">/</span>
|
||||
<span id="chan" class="chan clickable" title="Show big URL"><?php echo(ucfirst($list));?></span>
|
||||
</div>
|
||||
|
||||
<ul class="title-container">
|
||||
<li class="song-title cursor-pointer truncate" id="song-title">
|
||||
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" />
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<ul class="right control-list noselect">
|
||||
<li id="search_loader" class="valign-wrapper hide">
|
||||
<div class="valign">
|
||||
<div class="preloader-wrapper small active">
|
||||
<div class="spinner-layer spinner-blue">
|
||||
<div class="circle-clipper left">
|
||||
<div class="circle"></div>
|
||||
</div><div class="gap-patch">
|
||||
<div class="circle"></div>
|
||||
</div><div class="circle-clipper right">
|
||||
<div class="circle"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="spinner-layer spinner-red">
|
||||
<div class="circle-clipper left">
|
||||
<div class="circle"></div>
|
||||
</div><div class="gap-patch">
|
||||
<div class="circle"></div>
|
||||
</div><div class="circle-clipper right">
|
||||
<div class="circle"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="spinner-layer spinner-yellow">
|
||||
<div class="circle-clipper left">
|
||||
<div class="circle"></div>
|
||||
</div><div class="gap-patch">
|
||||
<div class="circle"></div>
|
||||
</div><div class="circle-clipper right">
|
||||
<div class="circle"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="spinner-layer spinner-green">
|
||||
<div class="circle-clipper left">
|
||||
<div class="circle"></div>
|
||||
</div><div class="gap-patch">
|
||||
<div class="circle"></div>
|
||||
</div><div class="circle-clipper right">
|
||||
<div class="circle"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a class="nav-btn" href="#find" id="search-btn">
|
||||
<i class="mdi-action-search"></i>
|
||||
<span class="hover-text">Find</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="nav-btn" href="#skip" id="skip">
|
||||
<i class="mdi-av-skip-next"></i>
|
||||
<span class="hover-text">Skip</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="nav-btn hide-on-small-only" href="#stir" id="shuffle">
|
||||
<i class="mdi-av-shuffle"></i>
|
||||
<span class="hover-text">Stir</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="nav-btn" href="#settings" data-activates="settings-bar" id="settings">
|
||||
<i class="mdi-image-dehaze"></i>
|
||||
<span class="hover-text">Conf</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="side-nav" id="settings-bar">
|
||||
<?php include("public/php/panel.php");?>
|
||||
</ul>
|
||||
<div id="results" class="search_results hide">
|
||||
<div id="temp-results-container">
|
||||
<div id="temp-results" class="result-object">
|
||||
<div id="result" class="result">
|
||||
<img class="thumb" src="/public/images/loading.png" alt="Thumb"/>
|
||||
|
||||
<div class="search-title truncate"></div>
|
||||
<span class="result_info"></span>
|
||||
|
||||
<div class="waves-effect waves-orange btn-flat" id="add-many" title="Add several videos">
|
||||
<i class="mdi-av-playlist-add"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="empty-results-container">
|
||||
<div id='empty-results' class='valign-wrapper'>
|
||||
<span class='valign'>No results found..</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
<div id="help" class="modal">
|
||||
<div class="modal-content">
|
||||
<h4>So you need help?</h4>
|
||||
<p>When listening on a channel, there are some different buttons you can click.</p>
|
||||
<p>If you click the cogwheel, you'll open the settings panel. Here you can change channel settings, decide if you want the computer you're on can be remote-controlled, and import playlists from YouTube.</p>
|
||||
<p>The search-icon, opens up a search inputfield. If you start typing here, the site will automagically search for your input!</p>
|
||||
<p>If you click the button next to the search icon, you'll skip on a song. The one next to that one, is shuffleling of the list. Next one there again is to open the chat.</p>
|
||||
<p>Clicking a song in the playlist, gives it a vote. If you're logged in, you'll have a delete button at your disposal.</p>
|
||||
<p>Also, whenever you're logged in, you'll have two tabs in the top of the playlist thats called "Playlist" and "Suggested". The playlist obviously shows the playlist. But the suggested tab, shows 5 songs that YouTube recommends based on the current song. There might also be user recommended songs. To add any of these, just click them as you'd click a song to vote.</p>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#!" class=" modal-action modal-close waves-effect waves-green btn-flat">Close</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="embed" class="modal">
|
||||
<div class="modal-content">
|
||||
<h4>Embed code</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 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="color" id="color_embed" class="settings_embed" value="#808080" />
|
||||
</p>
|
||||
<textarea id="embed-area"></textarea>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a href="#!" class=" modal-action modal-close waves-effect waves-green btn-flat">Close</a>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div id="channel-load" class="progress">
|
||||
<div class="indeterminate" id="channel-load-move"></div>
|
||||
</div>
|
||||
<main class="container center-align main">
|
||||
<div id="main-row" class="row">
|
||||
<div id="video-container" class="col s12 m9 video-container no-opacity click-through">
|
||||
<!--
|
||||
width: calc(100% - 261px);
|
||||
display: inline;
|
||||
-->
|
||||
<div id="player" class="ytplayer"></div>
|
||||
<div id="main_components">
|
||||
<div id="player_overlay" class="hide valign-wrapper">
|
||||
<div id="playing_on"><div id="chromecast_icon">
|
||||
<i class="mdi-hardware-cast-connected"></i>
|
||||
</div>
|
||||
<div id="chromecast_text"></div>
|
||||
</div>
|
||||
<div id="player_overlay_text" class="valign center-align">
|
||||
Waiting for Video
|
||||
</div>
|
||||
<div id="player_overlay_controls" class="hide valign-wrapper">
|
||||
<div id="playpause-overlay" class="valign center-align">
|
||||
<i id="play-overlay" class="mdi-av-play-arrow hide"></i>
|
||||
<i id="pause-overlay" class="mdi-av-pause"></i>
|
||||
</div>
|
||||
<div id="volume-button-overlay">
|
||||
<i id="v-mute-overlay" class="mdi-av-volume-off"></i>
|
||||
<i id="v-low-overlay" class="mdi-av-volume-mute"></i>
|
||||
<i id="v-medium-overlay" class="mdi-av-volume-down"></i>
|
||||
<i id="v-full-overlay" class="mdi-av-volume-up"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="controls" class="noselect">
|
||||
<div id="playpause">
|
||||
<i id="play" class="mdi-av-play-arrow hide"></i>
|
||||
<i id="pause" class="mdi-av-pause"></i>
|
||||
</div>
|
||||
<div id="duration"></div>
|
||||
<div id="fullscreen">
|
||||
<i class="mdi-navigation-fullscreen"></i>
|
||||
</div>
|
||||
<button class="castButton mdi-hardware-cast tooltipped" data-position="top" data-delay="10" data-tooltip="Cast Zöff to TV" is="google-cast-button">
|
||||
</button>
|
||||
<button class="castButton-active hide mdi-hardware-cast-connected tooltipped" data-position="top" data-delay="10" data-tooltip="Stop casting" >
|
||||
</button>
|
||||
<div id="volume-button">
|
||||
<i id="v-mute" class="mdi-av-volume-off"></i>
|
||||
<i id="v-low" class="mdi-av-volume-mute"></i>
|
||||
<i id="v-medium" class="mdi-av-volume-down"></i>
|
||||
<i id="v-full" class="mdi-av-volume-up"></i>
|
||||
</div>
|
||||
<div id="volume"></div>
|
||||
<div id="viewers"></div>
|
||||
<div id="bar"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="playlist" class="col s12 m3">
|
||||
<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>
|
||||
<ul class="tabs playlist-tabs" style="width:96%">
|
||||
<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 chat-link" href="#chat">Chat</a></li>
|
||||
</ul>
|
||||
<ul class="tabs playlist-tabs-loggedIn hide" style="width: 96%;">
|
||||
<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" class="card left-align list-song">
|
||||
<div class="clickable vote-container" title="Vote!">
|
||||
<a class="clickable center-align votebg">
|
||||
<span class="lazy card-image cardbg list-image" style="background-image:url('/public/images/loading.png');"></span>
|
||||
</a>
|
||||
<span class="card-content">
|
||||
<span class="flow-text truncate list-title"></span>
|
||||
<span class="vote-span">
|
||||
<span class="list-votes"></span>
|
||||
<span class="highlighted vote-text"> votes</span>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="card-action center-align list-remove hide">
|
||||
<a title="Remove song" id="del" class="waves-effect btn-flat clickable">Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="suggestions" class="tabs_height" style="display:none;">
|
||||
<p class="suggest-title-info">YouTube Suggests:</p>
|
||||
<div class="suggest_bar" id="suggest-song-html">
|
||||
</div>
|
||||
<p class="suggest-title-info" id="user_suggests">Users Suggests:</p>
|
||||
<div class="suggest_bar" id="user-suggest-html">
|
||||
</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">
|
||||
<input id="text-chat-input" name="input" type="text" autocomplete="off" placeholder="Chat" maxlength="150" />
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="playbar">
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php include("public/php/footer.php"); ?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -9,7 +9,7 @@
|
||||
<nav id="fp-nav">
|
||||
<div class="nav-wrapper">
|
||||
<a href="//zoff.no" class="brand-logo hide-on-small-only">
|
||||
<img id="zicon" src="/static/images/squareicon_small.png" alt="zöff" title="Zöff" />
|
||||
<img id="zicon" src="/public/images/squareicon_small.png" alt="zöff" title="Zöff" />
|
||||
</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">
|
||||
@@ -112,6 +112,6 @@
|
||||
<?php include("footer.php"); ?>
|
||||
|
||||
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.3/jquery.ui.touch-punch.min.js"></script>
|
||||
<script type="text/javascript" src="/static/dist/remote.min.js"></script>
|
||||
<script type="text/javascript" src="/public/dist/remote.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -98,16 +98,16 @@
|
||||
<ul>
|
||||
<li>
|
||||
<a href="https://github.com/zoff-music/">
|
||||
<img title="Contribute on GitHub" src="/static/images/GitHub_Logo.png" alt="GitHub" />
|
||||
<img title="Contribute on GitHub" src="/public/images/GitHub_Logo.png" alt="GitHub" />
|
||||
</a>
|
||||
<p>
|
||||
<a id="facebook-code-link" class="waves-effect waves-light btn light-blue share shareface" href="https://www.facebook.com/sharer/sharer.php?u=http://<?php echo $_SERVER['HTTP_HOST'].'/'.$list; ?>" target="popup" onclick="window.open('https://www.facebook.com/sharer/sharer.php?u=http://<?php echo $_SERVER['HTTP_HOST'].'/'.$list; ?>','Share Playlist','width=600,height=300')">
|
||||
<img class="left" src="/static/images/facebook.png" alt="Share on Facebook" />Share on Facebook
|
||||
<img class="left" src="/public/images/facebook.png" alt="Share on Facebook" />Share on Facebook
|
||||
</a>
|
||||
</p>
|
||||
<p>
|
||||
<a id="twitter-code-link" class="waves-effect waves-light btn light-blue share" href="http://twitter.com/intent/tweet?url=http://<?php echo $_SERVER['HTTP_HOST'].'/'.$list; ?>&text=Check%20out%20this%20playlist%20<?php echo ucfirst($list); ?>%20on%20Zöff!&via=zoffmusic" target="popup" onclick="window.open('http://twitter.com/intent/tweet?url=http://<?php echo $_SERVER['HTTP_HOST'].'/'.$list; ?>&text=Check%20out%20this%20playlist%20<?php echo ucfirst($list); ?>%20on%20Zöff!&via=zoffmusic','Share Playlist','width=600,height=300')">
|
||||
<img class="left" src="/static/images/twitter.png" alt="Share on Twitter" />Share on Twitter
|
||||
<img class="left" src="/public/images/twitter.png" alt="Share on Twitter" />Share on Twitter
|
||||
</a>
|
||||
</p>
|
||||
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank" id="donate_form">
|
||||
@@ -13,7 +13,7 @@
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="mobile-web-app-capable" content="yes">
|
||||
<meta name="theme-color" content="#2D2D2D" />
|
||||
<meta property="og:image" content="https://zoff.no/static/images/favicon.png" />
|
||||
<meta property="og:image" content="https://zoff.no/public/images/favicon.png" />
|
||||
<meta property="og:url" content="https://zoff.no" />
|
||||
<meta property="og:title" content="Zöff"/>
|
||||
<meta property="og:description" content="The Shared (free) YouTube radio."/>
|
||||
@@ -21,9 +21,9 @@
|
||||
<meta property="fb:app_id" content="1581693815380949" />
|
||||
<link rel="manifest" href="/manifest.json">
|
||||
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.min.css">
|
||||
<link type="text/css" rel="stylesheet" href="/static/css/materialize.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/static/css/style.css" title="Default" />
|
||||
<link rel="icon" id="favicon" type="image/png" href="/static/images/favicon.png"/>
|
||||
<link type="text/css" rel="stylesheet" href="/public/css/materialize.min.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/public/css/style.css" title="Default" />
|
||||
<link rel="icon" id="favicon" type="image/png" href="/public/images/favicon.png"/>
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
@@ -34,11 +34,11 @@
|
||||
ga('send', 'pageview');
|
||||
|
||||
</script>
|
||||
<script type="text/javascript" src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1"></script>
|
||||
<script type="text/javascript" src="/static/dist/lib/jquery-2.1.3.min.js"></script>
|
||||
<script type="text/javascript" src="/static/dist/lib/jquery-ui-1.10.3.min.js"></script>
|
||||
<script type="text/javascript" src="/static/dist/lib/materialize.min.js"></script>
|
||||
<script type="text/javascript" src="/static/dist/lib/socket.io-1.4.5.js"></script>
|
||||
<script type="text/javascript" src="/static/dist/lib/color-thief.js"></script>
|
||||
<script type="text/javascript" src="/static/dist/lib/sha256.js"></script>
|
||||
<script type="text/javascript" src="/static/dist/lib/aes.js"></script>
|
||||
<script type="text/javascript" src="https://www.gpublic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1"></script>
|
||||
<script type="text/javascript" src="/public/dist/lib/jquery-2.1.3.min.js"></script>
|
||||
<script type="text/javascript" src="/public/dist/lib/jquery-ui-1.10.3.min.js"></script>
|
||||
<script type="text/javascript" src="/public/dist/lib/materialize.min.js"></script>
|
||||
<script type="text/javascript" src="/public/dist/lib/socket.io-1.4.5.js"></script>
|
||||
<script type="text/javascript" src="/public/dist/lib/color-thief.js"></script>
|
||||
<script type="text/javascript" src="/public/dist/lib/sha256.js"></script>
|
||||
<script type="text/javascript" src="/public/dist/lib/aes.js"></script>
|
||||
@@ -12,7 +12,7 @@ $output = $image->getimageblob();
|
||||
|
||||
$image->setImageFormat("jpeg");
|
||||
|
||||
file_put_contents ("../static/images/thumbnails/".$_POST['id'].".jpg", $image);
|
||||
file_put_contents ("../public/images/thumbnails/".$_POST['id'].".jpg", $image);
|
||||
|
||||
echo base64_encode($output);
|
||||
?>
|
||||
@@ -10,14 +10,14 @@ if(isset($_GET['chan'])){
|
||||
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
|
||||
<meta name="robots" content="index, nofollow" />
|
||||
<?php include("header.php"); ?>
|
||||
<script type="text/javascript" src="/static/dist/main.min.js"></script>
|
||||
<script type="text/javascript" src="/public/dist/main.min.js"></script>
|
||||
</head>
|
||||
<body class="noselect cursor-default">
|
||||
<header>
|
||||
<nav id="fp-nav">
|
||||
<div class="nav-wrapper">
|
||||
<a href="#" class="brand-logo noselect">
|
||||
<img id="zicon" src="static/images/squareicon_small.png" alt="zöff" title="Zöff" />
|
||||
<img id="zicon" src="public/images/squareicon_small.png" alt="zöff" title="Zöff" />
|
||||
</a>
|
||||
<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>-->
|
||||
@@ -173,6 +173,6 @@ if(isset($_GET['chan'])){
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<?php include("php/footer.php"); ?>
|
||||
<?php include("public/php/footer.php"); ?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -142,7 +142,7 @@
|
||||
<li class="white-bg">
|
||||
<div class="input-field field-settings youtube_unclicked import-buttons">
|
||||
<a class="modal-trigger waves-effect red btn import-youtube" title="Import from YouTube playlist">
|
||||
<img src="/static/images/youtube.png" class="youtube_logo" alt="Youtube Logo" />
|
||||
<img src="/public/images/youtube.png" class="youtube_logo" alt="Youtube Logo" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="input-field field-settings youtube_clicked">
|
||||
@@ -206,7 +206,7 @@
|
||||
<li class="white-bg">
|
||||
<div class="input-field field-settings spotify_unauthenticated import-buttons">
|
||||
<a class="modal-trigger waves-effect green lighten btn import-spotify-auth" title="Import Spotify playlist">
|
||||
<img src="/static/images/spotify.png" class="left spotify_logo" alt="Spotify Logo" />Spotify
|
||||
<img src="/public/images/spotify.png" class="left spotify_logo" alt="Spotify Logo" />Spotify
|
||||
</a>
|
||||
</div>
|
||||
<div class="input-field field-settings spotify_authenticated">
|
||||
@@ -295,7 +295,7 @@
|
||||
<li class="white-bg">
|
||||
<div class="input-field field-settings youtube_export_button export-buttons">
|
||||
<a class="modal-trigger waves-effect red btn export-youtube" id="listExport" title="Export to YouTube">
|
||||
<img src="/static/images/youtube.png" class="youtube_logo" alt="Youtube Logo" />
|
||||
<img src="/public/images/youtube.png" class="youtube_logo" alt="Youtube Logo" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="input-field field-settings">
|
||||
@@ -1,39 +1,23 @@
|
||||
var version = 'v3.2';
|
||||
var version = 'v3.3';
|
||||
var CACHE_FILES = [
|
||||
'/offline.html',
|
||||
'/public/html/offline.html',
|
||||
'/manifest.json',
|
||||
'/static/images/favicon.png'
|
||||
'/public/images/favicon.png'
|
||||
];
|
||||
|
||||
self.addEventListener("install", function(event) {
|
||||
event.waitUntil(
|
||||
/* The caches built-in is a promise-based API that helps you cache responses,
|
||||
as well as finding and deleting them.
|
||||
*/
|
||||
caches
|
||||
/* You can open a cache by name, and this method returns a promise. We use
|
||||
a versioned cache name here so that we can remove old cache entries in
|
||||
one fell swoop later, when phasing out an older service worker.
|
||||
*/
|
||||
.open(version + '::zoff')
|
||||
.then(function(cache) {
|
||||
/* After the cache is opened, we can fill it with the offline fundamentals.
|
||||
The method below will add all resources we've indicated to the cache,
|
||||
after making HTTP requests for each of them.
|
||||
*/
|
||||
return cache.addAll(CACHE_FILES);
|
||||
})
|
||||
.then(function() {
|
||||
//console.log('WORKER: install completed');
|
||||
})
|
||||
);
|
||||
});
|
||||
|
||||
self.addEventListener("activate", function(event) {
|
||||
/* Just like with the install event, event.waitUntil blocks activate on a promise.
|
||||
Activation will fail unless the promise is fulfilled.
|
||||
*/
|
||||
//console.log('WORKER: activate event in progress.');
|
||||
|
||||
var cacheWhitelist = version;
|
||||
|
||||
@@ -46,63 +30,24 @@ self.addEventListener("activate", function(event) {
|
||||
}));
|
||||
})
|
||||
);
|
||||
/*
|
||||
event.waitUntil(
|
||||
caches
|
||||
/* This method returns a promise which will resolve to an array of available
|
||||
cache keys.
|
||||
|
||||
.keys()
|
||||
.then(function (keys) {
|
||||
// We return a promise that settles when all outdated caches are deleted.
|
||||
return Promise.all(
|
||||
keys
|
||||
.filter(function (key) {
|
||||
// Filter by keys that don't start with the latest version prefix.
|
||||
return !key.startsWith(version);
|
||||
})
|
||||
.map(function (key) {
|
||||
/* Return a promise that's fulfilled
|
||||
when each outdated cache is deleted.
|
||||
|
||||
return caches.delete(key);
|
||||
})
|
||||
);
|
||||
})
|
||||
.then(function() {
|
||||
//console.log('WORKER: activate completed.');
|
||||
})
|
||||
);
|
||||
*/
|
||||
});
|
||||
|
||||
self.addEventListener('fetch', event => {
|
||||
// We only want to call event.respondWith() if this is a navigation request
|
||||
// for an HTML page.
|
||||
// request.mode of 'navigate' is unfortunately not supported in Chrome
|
||||
// versions older than 49, so we need to include a less precise fallback,
|
||||
// which checks for a GET request with an Accept: text/html header.
|
||||
if (event.request.mode === 'navigate' ||
|
||||
(event.request.method === 'GET' &&
|
||||
(event.request.headers.get('accept').includes('text/html') ||
|
||||
event.request.headers.get('accept').includes('text/css') ||
|
||||
(event.request.headers.get('accept').includes('*/*') &&
|
||||
//event.request.mode == "no-cors" &&
|
||||
(event.request.url.includes('localhost') || event.request.url.includes('zoff.no')))))) {
|
||||
event.respondWith(
|
||||
fetch(event.request.url).catch(error => {
|
||||
// The catch is only triggered if fetch() throws an exception, which will most likely
|
||||
// happen due to the server being unreachable.
|
||||
// If fetch() returns a valid HTTP response with an response code in the 4xx or 5xx
|
||||
// range, the catch() will NOT be called. If you need custom handling for 4xx or 5xx
|
||||
// errors, see https://github.com/GoogleChrome/samples/tree/gh-pages/service-worker/fallback-response
|
||||
if(event.request.url.includes('manifest.json')){
|
||||
return caches.open(version + "::zoff").then(function(cache) {
|
||||
return cache.match("/manifest.json");
|
||||
});
|
||||
} else if (event.request.url.includes('favicon')) {
|
||||
return caches.open(version + "::zoff").then(function(cache) {
|
||||
return cache.match("/static/images/favicon.png");
|
||||
return cache.match("/public/images/favicon.png");
|
||||
});
|
||||
} else if (event.request.url.includes('service-worker')) {
|
||||
return caches.open(version + "::zoff").then(function(cache) {
|
||||
@@ -110,15 +55,11 @@ self.addEventListener('fetch', event => {
|
||||
});
|
||||
} else {
|
||||
return caches.open(version + "::zoff").then(function(cache) {
|
||||
return cache.match("/offline.html");
|
||||
return cache.match("/public/html/offline.html");
|
||||
});
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
// If our if() condition is false, then this fetch handler won't intercept the request.
|
||||
// If there are any other fetch handlers registered, they will get a chance to call
|
||||
// event.respondWith(). If no fetch handlers call event.respondWith(), the request will be
|
||||
// handled by the browser as if there were no service worker involvement.
|
||||
});
|
||||
|
||||