Advertisement
Guest User

Untitled

a guest
Jan 16th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. <script>
  2. $(function() {
  3. function update() {
  4. document.getElementById("song").innerHTML = '<i class="fas fa-sync fa-spin"></i>';
  5. jQuery.ajax({
  6. type: 'GET',
  7. url: "https://zoneradio.de/ajax/updateSong",
  8. dataType: "json",
  9. success: function (d) {
  10. if (d.islive == 0) {
  11. if(d.currentSong == "false" || d.currentSong == "null") {
  12. document.getElementById("song").innerHTML = '<i class="fas fa-sync fa-spin"></i>';
  13. } else {
  14. document.getElementById("tag").innerHTML = 'AutoDJ';
  15. document.getElementById("song").innerHTML = '' + d.currentSong + '';
  16. document.getElementById("wish").innerHTML = '';
  17. }
  18. } else {
  19. jQuery.ajax({
  20. type: 'GET',
  21. url: "https://zoneradio.de/ajax/getShowinfos",
  22. dataType: "json",
  23. success: function (n) {
  24. document.getElementById("tag").innerHTML = 'LIVE';
  25. document.getElementById("song").innerHTML = n.showname;
  26. document.getElementById("wish").innerHTML = "- <a href='https://zoneradio.de/musikwunsch' class='white-text'>Jetzt Musikwunsch einsenden <i class='fas fa-arrow-right'></i></a>";
  27. },
  28. error:function(n){
  29. document.getElementById("song").innerHTML = '<i class="fas fa-sync fa-spin"></i>';
  30. }
  31. });
  32. }
  33. },
  34. error:function(d){
  35. document.getElementById("song").innerHTML = '<i class="fas fa-sync fa-spin"></i>';
  36. }
  37. });
  38. }
  39. setInterval(update, 30000);
  40. update();
  41. });
  42. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement