fixed missing quotes around mp3
authorBenjamin Mako Hill <mako@atdot.cc>
Tue, 8 Nov 2011 00:04:34 +0000 (19:04 -0500)
committerBenjamin Mako Hill <mako@atdot.cc>
Tue, 8 Nov 2011 00:56:38 +0000 (19:56 -0500)
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.

jsScuttle.php

index 60e403ac7db2d3af5e9571ecc31d81289d202a03..9c6b9b7dbc39d8a2ee210e24de06ecd30dee2ac7 100644 (file)
@@ -116,7 +116,7 @@ $(function() {
        
   // 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 +'&amp;b_bgcolor=ffffff&amp;b_fgcolor=000000&amp;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 +'&amp;b_bgcolor=ffffff&amp;b_fgcolor=000000&amp;b_colors=0000ff,0000ff,ff0000,ff0000&amp;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" />';

Benjamin Mako Hill || Want to submit a patch?