From b7067b2085c6761956b9d6076642d7b6f31192c1 Mon Sep 17 00:00:00 2001 From: Cesar Arevalo Date: Sat, 26 Nov 2011 12:16:32 -0800 Subject: [PATCH] Adding the location scheme to the request URLs, to make secure ajax requests when on a secure page (https) --- jquery.query-yql.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/jquery.query-yql.js b/jquery.query-yql.js index 2a23e23..cb518be 100644 --- a/jquery.query-yql.js +++ b/jquery.query-yql.js @@ -21,11 +21,13 @@ envUrl = undefined; } + var scheme = ('https:' == document.location.protocol ? 'https' : 'http'); + if (envUrl === "all") { - envUrl = "http://datatables.org/alltables.env"; + envUrl = scheme + "://datatables.org/alltables.env"; } - var url = "http://query.yahooapis.com/v1/public/yql?callback=?"; + var url = scheme + "://query.yahooapis.com/v1/public/yql?callback=?"; var data = { format: type, q: statement