In my system, with JQuery 1.5, the previous two commits caused *every*
link to load the Flash MP3 mplayer, even though none of these were
playable. This patch fixes that issue.
The issue, as far as I can tell, seems to be due to a change in the
version of JQuery. But I have only looked close enough to fix the bug.
// Insert Flash player for MP3 links
if ($("#bookmarks").length > 0) {
- $("a[href$=.mp3].taggedlink").each(function() {
+ $('a[href$=".mp3"].taggedlink').each(function() {
var url = this.href;
var code = '<object type="application/x-shockwave-flash" data="<?php echo $player_root ?>musicplayer_f6.swf?song_url=' + url +'&b_bgcolor=ffffff&b_fgcolor=000000&b_colors=0000ff,0000ff,ff0000,ff0000&buttons=<?php echo $player_root ?>load.swf,<?php echo $player_root ?>play.swf,<?php echo $player_root ?>stop.swf,<?php echo $player_root ?>error.swf" width="14" height="14">';
code = code + '<param name="movie" value="<?php echo $player_root ?>musicplayer.swf?song_url=' + url +'&b_bgcolor=ffffff&b_fgcolor=000000&b_colors=0000ff,0000ff,ff0000,ff0000&buttons=<?php echo $player_root ?>load.swf,<?php echo $player_root ?>play.swf,<?php echo $player_root ?>stop.swf,<?php echo $player_root ?>error.swf" />';