mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
gulp listener on remotecontroller too, and updated remotecontroller.js
This commit is contained in:
1
static/build-js/main-fp.js
Normal file
1
static/build-js/main-fp.js
Normal file
@@ -0,0 +1 @@
|
||||
!function(){function e(e){var n="",a=0;e.sort(t),pre_card=$(o);for(x in e){var i=e[x][3];if(20>a){var s=e[x][1],l=e[x][0],r="background-image:url('https://img.youtube.com/vi/"+s+"/hqdefault.jpg');",c=e[x][4],d=pre_card;d.find(".chan-name").text(i),d.find(".chan-name").attr("title",i),d.find(".chan-views").text(l),d.find(".chan-songs").text(c),d.find(".chan-bg").attr("style",r),d.find(".chan-link").attr("href",i),$("#channels").append(d.html())}n+="<option value='"+i+"'> ",a++}document.getElementById("preloader").style.display="none",document.getElementById("searches").innerHTML=n,$("#channels").fadeIn(800),$("#search").focus()}function t(e,t){var o=e[0],n=t[0],a=e[4],i=t[4];return n>o?1:o>n?-1:i>a?1:a>i?-1:0}var o,n;String.prototype.capitalizeFirstLetter=function(){return this.charAt(0).toUpperCase()+this.slice(1)},$(document).ready(function(){o=$("#channels").html(),$("#channels").empty();var t=io.connect("//"+window.location.hostname+":3000");t.emit("frontpage_lists"),t.on("playlists",function(t){e(t)});var a=0;document.getElementById("zicon").addEventListener("click",function(){a+=10,document.getElementById("zicon").style.paddingLeft=a+"%",a>=100&&(window.location.href="https://www.youtube.com/v/0IGsNdVoEh0?autoplay=1&showinfo=0&autohide=1")}),n=$.ajax({type:"GET",url:"https://api.github.com/repos/zoff-music/zoff/commits",async:!1}).responseText,n=$.parseJSON(n),$("#latest-commit").html("Latest Commit: <br>"+n[0].commit.author.date.substring(0,10)+": "+n[0].committer.login+"<br><a href='"+n[0].html_url+"'>"+n[0].sha.substring(0,10)+"</a>: "+n[0].commit.message+"<br")})}();
|
||||
File diff suppressed because one or more lines are too long
1
static/build-js/remotecontroller-min.js
vendored
Normal file
1
static/build-js/remotecontroller-min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(){function e(){o?(t||(t=$("#code-input").val().toLowerCase()),$("#code-input").val(""),o=!1,$(".rc").css("display","block"),document.getElementById("base").setAttribute("onsubmit","control(); return false;"),$("#remote-text").text("Controlling "+t),document.getElementById("search").setAttribute("length","18"),document.getElementById("search").setAttribute("maxlength","18"),$("#forsearch").html("Type new channel name to change to"),$("#volume-control").slider({min:0,max:100,value:100,range:"min",animate:!0,stop:function(e,o){socket.emit("id",[t,"volume",o.value])}})):(socket.emit("id",[t,"channel",$("#search").val().toLowerCase()]),$("#search").val(""))}var t,o=!0;$(document).ready(function(){setTimeout(function(){$("#search").focus()},500),socket=io.connect("//"+window.location.hostname+":3000"),t=window.location.pathname.split("/")[2],t&&e()}),$("#playbutton").on("click",function(){socket.emit("id",[t,"play","mock"])}),$("#pausebutton").on("click",function(){socket.emit("id",[t,"pause","mock"])}),$("#skipbutton").on("click",function(){socket.emit("id",[t,"skip","mock"])})}();
|
||||
Reference in New Issue
Block a user