Browse Source

made stop button red, configured for external access (using ip) to convert into app

master
Sean Clarke 1 year ago
parent
commit
bae31e3e2b
2 changed files with 15 additions and 2 deletions
  1. +11
    -2
      index.html
  2. +4
    -0
      main.css

+ 11
- 2
index.html View File

@@ -10,18 +10,27 @@
<a href='#' onclick="radio(1);">Seanland's Game Music</a>
<a href='#' onclick="radio(2);">Seanland's Top 100s</a>
<a href='#' onclick="radio(3);">Seanland's Collection</a>
<a href='#' onclick="radio(stop);">Stop Music</a>
<a href='#' onclick="radio(stop);" class="stop">Stop Music</a>

<script type='text/javascript'>

//AJAX function
function radio(com) {
// change IP based on the player's address
var ip = "192.168.1.40";

$.ajax({
type: "POST",
url: "radio.php",
url: "http://" + ip + "/radio.php",
xhrFields: {
withCredentials: true
},
data: "radio=" + com,
success: function(msg){
// may add in the future
},
error: function (xhr, status) {
// handle errors
}
});
}


+ 4
- 0
main.css View File

@@ -15,3 +15,7 @@ a {
padding: 24px;
margin: 12px;
}

a.stop {
background: red;
}

Loading…
Cancel
Save