mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-02-01 02:05:03 -05:00
Move https buttons to S3 for now.
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
(function() {
|
||||
var prefix = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.reddit.com';
|
||||
if ('https:' == document.location.protocol) {
|
||||
var base_url = 'https://redditstatic.s3.amazonaws.com'
|
||||
} else {
|
||||
var base_url = 'http://www.reddit.com/static'
|
||||
}
|
||||
|
||||
var write_string="<iframe src=\"" + prefix + "/static/button/button1.html?width=120&url=";
|
||||
var write_string="<iframe src=\"" + base_url + "/button/button1.html?width=120&url=";
|
||||
|
||||
if (window.reddit_url) {
|
||||
write_string += encodeURIComponent(reddit_url);
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
(function() {
|
||||
var prefix = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.reddit.com';
|
||||
if ('https:' == document.location.protocol) {
|
||||
var base_url = 'https://redditstatic.s3.amazonaws.com'
|
||||
} else {
|
||||
var base_url = 'http://www.reddit.com/static'
|
||||
}
|
||||
|
||||
var write_string="<iframe src=\"" + prefix + "/static/button/button2.html?width=51&url=";
|
||||
var write_string="<iframe src=\"" + base_url + "/button/button2.html?width=51&url=";
|
||||
|
||||
if (window.reddit_url) {
|
||||
write_string += encodeURIComponent(reddit_url);
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
(function() {
|
||||
var prefix = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.reddit.com';
|
||||
if ('https:' == document.location.protocol) {
|
||||
var base_url = 'https://redditstatic.s3.amazonaws.com'
|
||||
} else {
|
||||
var base_url = 'http://www.reddit.com/static'
|
||||
}
|
||||
|
||||
var write_string="<iframe src=\"" + prefix + "/static/button/button3.html?width=69&url=";
|
||||
var write_string="<iframe src=\"" + base_url + "/button/button3.html?width=69&url=";
|
||||
|
||||
if (window.reddit_url) {
|
||||
write_string += encodeURIComponent(reddit_url);
|
||||
|
||||
@@ -160,11 +160,11 @@ $(function() {
|
||||
infoTarget = "/r/" + querydict.sr + infoTarget;
|
||||
}
|
||||
|
||||
var secure = 'https:' == document.location.protocol;
|
||||
if ($.cookie_read("session", "reddit_").data) {
|
||||
options.url = infoTarget;
|
||||
options.dataType = "json";
|
||||
} else {
|
||||
var secure = 'https:' == document.location.protocol;
|
||||
var prefix = secure ? "https://ssl.reddit.com" : "http://buttons.reddit.com";
|
||||
options.url = prefix + infoTarget;
|
||||
options.dataType = options.jsonp = "jsonp";
|
||||
@@ -179,7 +179,10 @@ $(function() {
|
||||
options.data["id"] = querydict.id;
|
||||
}
|
||||
|
||||
$.ajax(options);
|
||||
// Secure button info is disabled for now due to load.
|
||||
if (!secure) {
|
||||
$.ajax(options);
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user