https://bugzilla.wikimedia.org/show_bug.cgi?id=25439

--- Comment #1 from Nimish Gautam <ngau...@wikimedia.org> 2010-10-06 20:45:05 
UTC ---
Do we use "mode" in the function? This fixes the issue:

<code>
var rewrite_url = function() {
 var url =
'{{{banner-url-2010}}}?utm_medium=sitenotice&utm_campaign={{{campaign}}}&utm_source={{{banner}}}';

 var targets = String( '{{{targets}}' ).split(',');
 if ( targets.length ) {
  url += '&' + targets[Math.floor( Math.random() * targets.length
)].replace(/^\s+|\s+$/, '');
 }
 $j(".fundraiser-banner a.variable_lp").attr("href",url);
}
$j(document).ready(rewrite_url);
</code>

Also, in order to invoke this, the link needs to have the class "varialbe_lp"
appended to it, so it will look like this <a
class="variable_lp">{{{donate-text2}}}</a>

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to