Advertisement
Guest User

Song example OBS

a guest
Jun 27th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 0.75 KB | None | 0 0
  1. <html>
  2. <head>
  3. <script src="./js/jquery-2.2.2.min.js"></script>
  4. <!-- YOU NEED JQUERY SOMEWHERE ON YOUR SYSTEM! -->
  5. <script>
  6.  
  7.  function readFile() {
  8.  
  9. // This location can be anywhere, adjust where you want!
  10.    $.getJSON("C:\Users\Jamie\AppData\Roaming\Google Play Music Desktop Player\json_store\playback.json", function(data) {
  11.  
  12.     //Fills in the artist name in the correct div.
  13.     $("#artist").text(data['song']['artist'];
  14.      
  15.     // /Fills in the song name in the correct div.
  16.      $("#title").text(data['song']['title'];
  17.      
  18.     });
  19.   }
  20.  
  21.     $(function () {
  22.         setInterval(function() { readFile() },1000);
  23.     });
  24.  
  25. </script>
  26. </head>
  27.  
  28. <body>
  29. <div id="fullsong">
  30.     <div id="artist"></div> - <div id="title"></div>
  31. </div>
  32. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement