From 28cfe3d56d2139fc4a50ac9b20b2a73fe12f5a6c Mon Sep 17 00:00:00 2001 From: Roel Janssen Date: Tue, 15 Mar 2016 22:45:32 +0100 Subject: [PATCH] website: packages: Support both http and https requests to hydra.gnu.org. * website/static/base/js/packages.js (set_build_status): Use the protocol of the current URL. --- website/static/base/js/packages.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/static/base/js/packages.js b/website/static/base/js/packages.js index 246d828..12b827f 100644 --- a/website/static/base/js/packages.js +++ b/website/static/base/js/packages.js @@ -17,7 +17,7 @@ function set_build_status (pkg_string) pkgIcon.src = "../static/base/img/status-icons/"+ pkgInfo[0]["buildstatus"] + ".png"; } } - xhttp.open("GET", "http://hydra.gnu.org/api/latestbuilds?nr=1&project=gnu&jobset=master&job="+ pkg_string, true); + xhttp.open("GET", window.location.href.split(":")[0] + "://hydra.gnu.org/api/latestbuilds?nr=1&project=gnu&jobset=master&job="+ pkg_string, true); xhttp.send(); } } -- 2.6.3