Added message if someone ever donates, and updated the title of import field

This commit is contained in:
Kasper Rynning-Tønnesen
2015-07-13 12:16:45 +02:00
parent 924cbc9ede
commit 5baaab8575
5 changed files with 21 additions and 5 deletions

View File

@@ -38,7 +38,7 @@ if(isset($_GET['chan'])){
<br> <br>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<a href="#!" class=" modal-action modal-close waves-effect waves-green btn-flat">Close</a> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat">Close</a>
</div> </div>
</div> </div>
<div id="about" class="modal"> <div id="about" class="modal">
@@ -52,7 +52,21 @@ if(isset($_GET['chan'])){
</p> </p>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<a href="#!" class=" modal-action modal-close waves-effect waves-green btn-flat">Close</a> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat">Close</a>
</div>
</div>
<div id="donation" class="modal">
<div class="modal-content">
<h4>Thanks!</h4>
<p>Thanks for your donation, we love you &lt;3
<br><br>
We will use the money for something awesome, just you wait and see!
<br><br>
We might also add your name somewhere in the code as a sign of gratitude, see if you can find it! (Might take a day or two for us to see the donation and implement it..)
</p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat">I'm awesome! (Close)</a>
</div> </div>
</div> </div>
</header> </header>

View File

@@ -135,7 +135,7 @@
<div class="input-field field-settings"> <div class="input-field field-settings">
<form action="#" id="listImport" onsubmit="return false;"> <form action="#" id="listImport" onsubmit="return false;">
<i class="mdi-av-playlist-add import-icon"></i> <i class="mdi-av-playlist-add import-icon"></i>
<input title="Only works with 49 or less songs.." placeholder="Enter YouTube-list ID" id="import" type="text" class="validate" /> <input title="Input YouTube-playlist id here!" placeholder="Enter YouTube-list ID" id="import" type="text" class="validate" />
</form> </form>
</div> </div>
</li> </li>

View File

@@ -1 +1 @@
!function(){var e,t,o={populate_channels:function(t){var n="",a=0;t.sort(o.sortFunction),pre_card=$(e);for(x in t){var i=t[x][3];if(20>a){var s=t[x][1],l=t[x][0],r="background-image:url('https://img.youtube.com/vi/"+s+"/hqdefault.jpg');",c=t[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()},sortFunction:function(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},getCookie:function(e){for(var t=e+"=",o=document.cookie.split(";"),n=0;n<o.length;n++){for(var a=o[n];" "==a.charAt(0);)a=a.substring(1);if(0==a.indexOf(t))return a.substring(t.length,a.length)}return""}};String.prototype.capitalizeFirstLetter=function(){return this.charAt(0).toUpperCase()+this.slice(1)},$(document).ready(function(){e=$("#channel-list-container").html(),window.list_html=e,$("#channels").empty();var n=io.connect("//"+window.location.hostname+":3000");n.emit("frontpage_lists"),n.on("playlists",function(e){o.populate_channels(e)});var a=0;if(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")}),navigator.userAgent.toLowerCase().indexOf("android")>-1&&""==o.getCookie("show_prompt")){var i=confirm("Do you want to download the native app for this webpage?");if(i)window.location.href="https://play.google.com/store/apps/details?id=no.lqasse.zoff";else{var s=new Date;s.setTime(s.getTime()+864e6);var l="expires="+s.toUTCString();document.cookie="show_prompt=false;"+l}}t=$.ajax({type:"GET",url:"https://api.github.com/repos/zoff-music/zoff/commits",async:!1}).responseText,t=$.parseJSON(t),$("#latest-commit").html("Latest Commit: <br>"+t[0].commit.author.date.substring(0,10)+": "+t[0].committer.login+"<br><a href='"+t[0].html_url+"'>"+t[0].sha.substring(0,10)+"</a>: "+t[0].commit.message+"<br")})}(); !function(){var e,t,o={populate_channels:function(t){var n="",a=0;t.sort(o.sortFunction),pre_card=$(e);for(x in t){var s=t[x][3];if(20>a){var i=t[x][1],l=t[x][0],r="background-image:url('https://img.youtube.com/vi/"+i+"/hqdefault.jpg');",c=t[x][4],d=pre_card;d.find(".chan-name").text(s),d.find(".chan-name").attr("title",s),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",s),$("#channels").append(d.html())}n+="<option value='"+s+"'> ",a++}document.getElementById("preloader").style.display="none",document.getElementById("searches").innerHTML=n,$("#channels").fadeIn(800),$("#search").focus()},sortFunction:function(e,t){var o=e[0],n=t[0],a=e[4],s=t[4];return n>o?1:o>n?-1:s>a?1:a>s?-1:0},getCookie:function(e){for(var t=e+"=",o=document.cookie.split(";"),n=0;n<o.length;n++){for(var a=o[n];" "==a.charAt(0);)a=a.substring(1);if(0==a.indexOf(t))return a.substring(t.length,a.length)}return""}};String.prototype.capitalizeFirstLetter=function(){return this.charAt(0).toUpperCase()+this.slice(1)},$(document).ready(function(){"#donation"==window.location.hash&&$("#donation").openModal(),e=$("#channel-list-container").html(),window.list_html=e,$("#channels").empty();var n=io.connect("//"+window.location.hostname+":3000");n.emit("frontpage_lists"),n.on("playlists",function(e){o.populate_channels(e)});var a=0;if(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")}),navigator.userAgent.toLowerCase().indexOf("android")>-1&&""==o.getCookie("show_prompt")){var s=confirm("Do you want to download the native app for this webpage?");if(s)window.location.href="https://play.google.com/store/apps/details?id=no.lqasse.zoff";else{var i=new Date;i.setTime(i.getTime()+864e6);var l="expires="+i.toUTCString();document.cookie="show_prompt=false;"+l}}t=$.ajax({type:"GET",url:"https://api.github.com/repos/zoff-music/zoff/commits",async:!1}).responseText,t=$.parseJSON(t),$("#latest-commit").html("Latest Commit: <br>"+t[0].commit.author.date.substring(0,10)+": "+t[0].committer.login+"<br><a href='"+t[0].html_url+"'>"+t[0].sha.substring(0,10)+"</a>: "+t[0].commit.message+"<br")})}();

File diff suppressed because one or more lines are too long

View File

@@ -99,6 +99,8 @@ String.prototype.capitalizeFirstLetter = function() {
$(document).ready(function (){ $(document).ready(function (){
//Materialize.toast("<a href='/remote' style='color:white;'>Try out our new feature, remote!</a>", 8000) //Materialize.toast("<a href='/remote' style='color:white;'>Try out our new feature, remote!</a>", 8000)
if(window.location.hash == "#donation")
$('#donation').openModal()
list_html = $("#channel-list-container").html(); list_html = $("#channel-list-container").html();
window.list_html = list_html; window.list_html = list_html;