Index: chrome/browser/resources/file_manager/playlist.html |
diff --git a/chrome/browser/resources/file_manager/playlist.html b/chrome/browser/resources/file_manager/playlist.html |
deleted file mode 100644 |
index 56a6ffa85652cbcb6b64285330dbe3440dc6997d..0000000000000000000000000000000000000000 |
--- a/chrome/browser/resources/file_manager/playlist.html |
+++ /dev/null |
@@ -1,155 +0,0 @@ |
-<!DOCTYPE HTML> |
-<html i18n-values="dir:textdirection;"> |
-<head> |
-<meta charset="utf-8"> |
-<title>Media Playlist</title> |
-<style type="text/css"> |
-body { |
- background: #080809; |
-} |
- |
-.playlist { |
- width: 100%; |
- height: 100%; |
- background: #080809; |
- color: #8AACE7; |
- font-size: .7em; |
- position: absolute; |
- top: 0; |
- left: 0; |
-} |
- |
-.playlistitem { |
- width: 100%; |
- padding: 6px; |
- cursor: pointer; |
-} |
- |
-.playing { |
- background: #393b41; |
- color: #dddde7; |
- font-weight: bold; |
-} |
- |
-.tracknum { |
- width: 20px; |
- position: relative; |
- float: left; |
-} |
- |
-.title { |
- |
-} |
- |
-.innertitle { |
- text-decoration: line-through; |
-} |
- |
-.error { |
- color: red; |
- float: left; |
- padding-right: 5px; |
-} |
- |
-</style> |
-<script src="chrome://resources/js/local_strings.js"></script> |
-<script> |
- |
-function $(o) { |
- return document.getElementById(o); |
-} |
- |
-function pathIsVideoFile(path) { |
- return /\.(mp4|ogg|mpg|avi)$/i.test(path); |
-}; |
- |
-function pathIsAudioFile(path) { |
- return /\.(mp3|m4a)$/i.test(path); |
-}; |
- |
-/////////////////////////////////////////////////////////////////////////////// |
-// Document Functions: |
-/** |
- * Window onload handler, sets up the page. |
- */ |
- |
-var currentPlaylist = null; |
-var currentOffset = -1; |
-function load() { |
- document.body.addEventListener('dragover', function(e) { |
- if (e.preventDefault) e.preventDefault(); |
- }); |
- document.body.addEventListener('drop', function(e) { |
- if (e.preventDefault) e.preventDefault(); |
- }); |
- chrome.mediaPlayerPrivate.getPlaylist(false, getPlaylistCallback); |
- chrome.mediaPlayerPrivate.onPlaylistChanged.addListener(function() { |
- chrome.mediaPlayerPrivate.getPlaylist(false, getPlaylistCallback); |
- }); |
-}; |
- |
-function getDisplayNameFromPath(path) { |
- slash = path.lastIndexOf("/") |
- if (slash != -1) { |
- fileName = path.substring(slash+1,path.length) |
- return fileName; |
- } else { |
- return path; |
- } |
-}; |
- |
-function setPlaylistOffset(offset) { |
- chrome.mediaPlayerPrivate.playAt(offset); |
-}; |
- |
-function updateUI() { |
- var main = $('main'); |
- if (currentPlaylist) { |
- main.textContent = ''; |
- var main = $('main'); |
- for (var x = 0; x < currentPlaylist.length; x++) { |
- var rowdiv = document.createElement('div'); |
- rowdiv.className = 'playlistitem'; |
- |
- var numberdiv = document.createElement('div'); |
- numberdiv.className = 'tracknum'; |
- numberdiv.textContent = '' + (x + 1); |
- rowdiv.appendChild(numberdiv); |
- |
- var titlediv = document.createElement('div'); |
- if (currentPlaylist[x].error) { |
- var errormark = document.createElement('div'); |
- errormark.className = 'error'; |
- errormark.textContent = 'X'; |
- var innertitle = document.createElement('div'); |
- innertitle.className = 'innertitle'; |
- innertitle.textContent = |
- decodeURI(getDisplayNameFromPath(currentPlaylist[x].path)); |
- titlediv.appendChild(errormark); |
- titlediv.appendChild(innertitle); |
- } else { |
- titlediv.className = 'title'; |
- titlediv.textContent = |
- decodeURI(getDisplayNameFromPath(currentPlaylist[x].path)); |
- } |
- rowdiv.appendChild(titlediv); |
- rowdiv.onclick = new Function('setPlaylistOffset(' + x + ')'); |
- if (currentOffset == x) { |
- rowdiv.className = 'playlistitem playing'; |
- } |
- main.appendChild(rowdiv); |
- } |
- } |
-}; |
- |
-function getPlaylistCallback(playlist) { |
- currentPlaylist = playlist.items; |
- currentOffset = playlist.position; |
- updateUI(); |
-}; |
-</script> |
-<body onload='load();' onselectstart='return false'> |
-<div id='main' class='playlist'> |
-</div> |
-</body> |
-</html> |