Added gulp task for nochan also

This commit is contained in:
Kasper Rynning-Tønnesen
2015-06-24 19:51:11 +02:00
parent fc47c8a905
commit 28ee75c750
4 changed files with 17 additions and 5 deletions

View File

@@ -175,6 +175,6 @@ if(isset($_GET['chan'])){
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript" src="https://cdn.socket.io/socket.io-1.2.0.js"></script> <script type="text/javascript" src="https://cdn.socket.io/socket.io-1.2.0.js"></script>
<script type="text/javascript" src="static/js/lib/materialize.min.js"></script> <script type="text/javascript" src="static/js/lib/materialize.min.js"></script>
<script type="text/javascript" src="static/js/nochan-mini.js"></script> <script type="text/javascript" src="static/build-js/main-fp.js"></script>
</body> </body>
</html> </html>

View File

@@ -14,6 +14,18 @@ gulp.task('js', function () {
.pipe(gulp.dest('../static/build-js')); .pipe(gulp.dest('../static/build-js'));
}); });
gulp.task('nochan', function () {
gulp.src(['../static/js/nochan.js'])
.pipe(uglify({
mangle: true,
compress: true,
enclose: true
}))
.pipe(concat('main-fp.js'))
.pipe(gulp.dest('../static/build-js'));
});
gulp.task('default', function(){ gulp.task('default', function(){
gulp.watch('../static/js/*.js', ['js']); gulp.watch('../static/js/*.js', ['js']);
gulp.watch('../static/js/nochan.js', ['nochan']);
}); });

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,7 @@
var list_html; var list_html;
var git_info; var git_info;
/*
function getCookie(cname) { function getCookie(cname) {
var name = cname + "="; var name = cname + "=";
var ca = document.cookie.split(';'); var ca = document.cookie.split(';');
@@ -11,6 +12,7 @@ function getCookie(cname) {
} }
return ""; return "";
} }
*/
function populate_channels(lists) function populate_channels(lists)
{ {
@@ -27,7 +29,6 @@ function populate_channels(lists)
if(num<20) if(num<20)
{ {
var id = lists[x][1]; var id = lists[x][1];
var nowplaying = lists[x][2];
var viewers = lists[x][0]; var viewers = lists[x][0];
var img = "background-image:url('https://img.youtube.com/vi/"+id+"/hqdefault.jpg');"; var img = "background-image:url('https://img.youtube.com/vi/"+id+"/hqdefault.jpg');";
var song_count = lists[x][4]; var song_count = lists[x][4];
@@ -85,7 +86,6 @@ $(document).ready(function (){
$("#channels").empty(); $("#channels").empty();
var socket = io.connect('//'+window.location.hostname+':3000'); var socket = io.connect('//'+window.location.hostname+':3000');
var playlists = [];
socket.emit('frontpage_lists'); socket.emit('frontpage_lists');
socket.on('playlists', function(msg){ socket.on('playlists', function(msg){
populate_channels(msg); populate_channels(msg);
@@ -121,7 +121,7 @@ $(document).ready(function (){
}*/ }*/
git_info = $.ajax({ type: "GET", git_info = $.ajax({ type: "GET",
url: "https://api.github.com/repos/nixolas1/zoff/commits", url: "https://api.github.com/repos/zoff-music/zoff/commits",
async: false async: false
}).responseText; }).responseText;