Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use a reasonable default for apiurl, unless it's been explicitly set.

  • Loading branch information...
commit ae0b9f318e9c1266efb40940533f85868ef63c41 1 parent 381a7f2
@ieure ieure authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 html/index.html
View
6 html/index.html
@@ -4,7 +4,7 @@
<link rel="stylesheet" type="text/css" href="css/base.css" />
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
-var apiurl = "http://127.0.0.1:9998/";
+var apiurl = undefined;
var default_dist = 'example-unstable-lenny';
var gitref = '';
var repolist = [];
@@ -12,6 +12,10 @@
var selected = {};
var statusurl = '';
+if (typeof(apiurl) == "undefined") {
+ apiurl = window.location.protocol + "//" + window.location.host;
+}
+
function package_list(dist) {
selected['dist'] = dist;
$.getJSON(apiurl + '/repository/' + dist + '?callback=?', function(data) {
Please sign in to comment.
Something went wrong with that request. Please try again.