Commit 44d5a26a by Kenton Lee

Fix trailing slash bug in visualization.

parent 22085000
......@@ -145,8 +145,14 @@ function load_example(lines) {
}
$(document).ready(function() {
var path = get_param("path");
if(path.length >= 1) {
if (path[path.length - 1] == "/") {
// Strip trailing slash if present.
path = path.substr(0, path.length - 1);
}
$.ajax({
url : get_param("path"),
url : path,
dataType: "text",
success : function (data) {
var lines = data.split("\n");
......@@ -156,4 +162,5 @@ $(document).ready(function() {
load_example(lines);
}
});
}
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment