include JSONs in local
This commit is contained in:
parent
8659251bcf
commit
049b3ce0e5
5 changed files with 8 additions and 4 deletions
|
@ -135,7 +135,7 @@ class PreviewFrame extends React.Component {
|
|||
htmlHeadContents += '<script src="/loadData.js"></script>\n';
|
||||
htmlHeadContents += '<script src="/interceptor-functions.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>`);
|
||||
}
|
||||
|
||||
|
|
|
@ -216,7 +216,7 @@ class IDEView extends React.Component {
|
|||
</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 (
|
||||
<TextOutput />
|
||||
);
|
||||
|
|
1
static/data.min.json
Normal file
1
static/data.min.json
Normal file
File diff suppressed because one or more lines are too long
|
@ -12,6 +12,7 @@ function fetchJSONFile(path, callback) {
|
|||
httpRequest.open('GET', path,false);
|
||||
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
2
static/ntc.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue