From d148df03db2b74eee905f3a4f98586428c0a0cc2 Mon Sep 17 00:00:00 2001 From: davemachado Date: Wed, 16 Aug 2017 23:10:32 -0400 Subject: [PATCH] remove extra strings --- src/scripts.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/scripts.js b/src/scripts.js index cc79944..d971da1 100644 --- a/src/scripts.js +++ b/src/scripts.js @@ -1,10 +1,11 @@ function loadJSON(callback) { var xobj = new XMLHttpRequest(); xobj.overrideMimeType("application/json"); - xobj.open('GET', 'https://raw.githubusercontent.com/toddmotto/public-apis/master/json/entries.min.json', true); // Replace 'my_data' with the path to your file + xobj.open('GET', 'https://raw.githubusercontent.com/toddmotto/public-apis/master/json/entries.min.json', true); xobj.onreadystatechange = function () { if (xobj.readyState == 4 && xobj.status == "200") { - // Required use of an anonymous callback as .open will NOT return a value but simply returns undefined in asynchronous mode + // Required use of an anonymous callback as .open will NOT return a value + // but simply returns undefined in asynchronous mode callback(xobj.responseText); } };