Permalink
Browse files

Disambiguate shadowed 'target' variable in buttons code.

Thanks to a suggestion by Octatone.
  • Loading branch information...
chromakode committed Dec 16, 2011
1 parent 66eab95 commit 85a1ca9425683932c4acfcb4312621f32cacfc24
Showing with 4 additions and 4 deletions.
  1. +4 −4 r2/r2/public/static/js/blogbutton.js
@@ -155,16 +155,16 @@ $(function() {
error: make_submit
};
- var target = "/button_info.json";
+ var infoTarget = "/button_info.json";
if (querydict.sr) {
- target = "/r/" + querydict.sr + target;
+ infoTarget = "/r/" + querydict.sr + infoTarget;
}
if ($.cookie_read("session", "reddit_").data) {
- options.url = target;
+ options.url = infoTarget;
options.dataType = "json";
} else {
- options.url = "http://buttons.reddit.com" + target;
+ options.url = "http://buttons.reddit.com" + infoTarget;
options.dataType = options.jsonp = "jsonp";
options.jsonpCallback = "buttonInfoCb";
options.cache = true;

0 comments on commit 85a1ca9

Please sign in to comment.