include JSONs in local

This commit is contained in:
MathuraMG 2016-08-19 12:44:44 -04:00
parent 8659251bcf
commit 049b3ce0e5
5 changed files with 8 additions and 4 deletions

View file

@ -135,7 +135,7 @@ class PreviewFrame extends React.Component {
htmlHeadContents += '<script src="/loadData.js"></script>\n'; htmlHeadContents += '<script src="/loadData.js"></script>\n';
htmlHeadContents += '<script src="/interceptor-functions.js"></script>\n'; htmlHeadContents += '<script src="/interceptor-functions.js"></script>\n';
htmlHeadContents += '<script src="/intercept-p5.js"></script>\n'; htmlHeadContents += '<script src="/intercept-p5.js"></script>\n';
htmlHeadContents += '<script type="text/javascript" src="http://chir.ag/projects/ntc/ntc.js"></script>'; htmlHeadContents += '<script type="text/javascript" src="/ntc.min.js"></script>';
htmlFile = htmlFile.replace(/(?:<head.*?>)([\s\S]*?)(?:<\/head>)/gmi, `<head>\n${htmlHeadContents}\n</head>`); htmlFile = htmlFile.replace(/(?:<head.*?>)([\s\S]*?)(?:<\/head>)/gmi, `<head>\n${htmlHeadContents}\n</head>`);
} }

View file

@ -216,7 +216,7 @@ class IDEView extends React.Component {
</div> </div>
<div> <div>
{(() => { {(() => {
if (this.props.preferences.textOutput || this.props.ide.isTextOutputPlaying) { if ((this.props.preferences.textOutput && this.props.ide.isPlaying) || this.props.ide.isTextOutputPlaying) {
return ( return (
<TextOutput /> <TextOutput />
); );

1
static/data.min.json Normal file

File diff suppressed because one or more lines are too long

View file

@ -12,6 +12,7 @@ function fetchJSONFile(path, callback) {
httpRequest.open('GET', path,false); httpRequest.open('GET', path,false);
httpRequest.send(); httpRequest.send();
} }
fetchJSONFile('https://raw.githubusercontent.com/processing/p5.js-website/9f1a4cd299c1330b046373407d42894e274d20e7/reference/data.min.json', function(data){
allData = data; fetchJSONFile('data.min.json', function(data){
allData = data;
}); });

2
static/ntc.min.js vendored Normal file

File diff suppressed because one or more lines are too long