From 78c0eae9a300b18060cc9f5b4114d843e87a2025 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Sat, 13 Aug 2011 19:01:12 +0200 Subject: Fix fetching anchors in get_a(). --- static/player.js | 5 ++--- 1 file 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; } } -- cgit v1.2.3