mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-31 09:48:01 -05:00
Disambiguate shadowed 'target' variable in buttons code.
Thanks to a suggestion by Octatone.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user