| OLD | NEW |
| 1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
| 2 <html i18n-values="dir:textdirection;"> | 2 <html i18n-values="dir:textdirection;"> |
| 3 <head> | 3 <head> |
| 4 <meta charset="utf-8"> | 4 <meta charset="utf-8"> |
| 5 <title>Media Playlist</title> | 5 <title>Media Playlist</title> |
| 6 <style type="text/css"> | 6 <style type="text/css"> |
| 7 body { | 7 body { |
| 8 background: #080809; | 8 background: #080809; |
| 9 } | 9 } |
| 10 | 10 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 } | 98 } |
| 99 }; | 99 }; |
| 100 | 100 |
| 101 function setPlaylistOffset(offset) { | 101 function setPlaylistOffset(offset) { |
| 102 chrome.mediaPlayerPrivate.playAt(offset); | 102 chrome.mediaPlayerPrivate.playAt(offset); |
| 103 }; | 103 }; |
| 104 | 104 |
| 105 function updateUI() { | 105 function updateUI() { |
| 106 var main = $('main'); | 106 var main = $('main'); |
| 107 if (currentPlaylist) { | 107 if (currentPlaylist) { |
| 108 main.innerHTML = ''; | 108 while (main.firstChild) { |
| 109 main.removeChild(main.firstChild); |
| 110 } |
| 109 var main = $('main'); | 111 var main = $('main'); |
| 110 for (var x = 0; x < currentPlaylist.length; x++) { | 112 for (var x = 0; x < currentPlaylist.length; x++) { |
| 111 var rowdiv = document.createElement('div'); | 113 var rowdiv = document.createElement('div'); |
| 112 rowdiv.className = 'playlistitem'; | 114 rowdiv.className = 'playlistitem'; |
| 113 | 115 |
| 114 var numberdiv = document.createElement('div'); | 116 var numberdiv = document.createElement('div'); |
| 115 numberdiv.className = 'tracknum'; | 117 numberdiv.className = 'tracknum'; |
| 116 numberdiv.textContent = '' + (x + 1); | 118 numberdiv.textContent = '' + (x + 1); |
| 117 rowdiv.appendChild(numberdiv); | 119 rowdiv.appendChild(numberdiv); |
| 118 | 120 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 146 currentPlaylist = playlist.items; | 148 currentPlaylist = playlist.items; |
| 147 currentOffset = playlist.position; | 149 currentOffset = playlist.position; |
| 148 updateUI(); | 150 updateUI(); |
| 149 }; | 151 }; |
| 150 </script> | 152 </script> |
| 151 <body onload='load();' onselectstart='return false'> | 153 <body onload='load();' onselectstart='return false'> |
| 152 <div id='main' class='playlist'> | 154 <div id='main' class='playlist'> |
| 153 </div> | 155 </div> |
| 154 </body> | 156 </body> |
| 155 </html> | 157 </html> |
| OLD | NEW |