diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2011-08-13 19:01:12 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2011-08-13 19:01:12 +0200 |
commit | 78c0eae9a300b18060cc9f5b4114d843e87a2025 (patch) | |
tree | bdb5ff4953fa18211665e5759c2b318ae9ef3f74 | |
parent | 4722c4cfceb2a2dbf9c1b7bcd1aa38925c6a1a60 (diff) |
Fix fetching anchors in get_a().
-rw-r--r-- | static/player.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/static/player.js b/static/player.js index ab583ee..90acf0b 100644 --- a/static/player.js +++ b/static/player.js @@ -17,7 +17,6 @@ function MusicListing(type, path, name, cached) { this.path = path; this.name = name ? name : path.split('/').pop(); this.a = document.createElement('a'); - this.a.tag = path; this.a.ml = this; this.play = function() { @@ -133,10 +132,10 @@ function add_directory() { var source = null; function get_a(path) { - var as = document.getElementsByTagName('a'); + var as = document.getElementById('song-links').getElementsByTagName('a'); for(var i = 0; i < as.length; i++) { var a = as[i]; - if(a.tag == path) + if(a.ml.path == path) return a; } } |