Closed MasterOfTheTiger closed 6 years ago
I get this error in the console when the custom require script runs: Failed to load file:///home/USERNAME/heb12/app/bible/Hebrews.json: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
Failed to load file:///home/USERNAME/heb12/app/bible/Hebrews.json: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
This is the code:
$.noConflict function require(url) { var rtrn jQuery.ajax({async:false,url: url, success: function(result){ if(url.search(".json")!==-1) {rtrn= JSON.parse(result);} else if(url.search(".js")!==-1) {rtrn= eval("function() {"+result+"}");} else { rtrn= result; } }});return rtrn; }
@amazinigmech2418 You need to look at it. We may need a different function.
@MasterOfTheTiger That's just an API error. It can't load json files in a local system.
So it will work on gh-pages?
I get this error in the console when the custom require script runs:
Failed to load file:///home/USERNAME/heb12/app/bible/Hebrews.json: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
This is the code: