add ntc
This commit is contained in:
parent
c14eae56c8
commit
8f68b3aa58
3 changed files with 18792 additions and 10 deletions
|
@ -29,6 +29,8 @@ class EditorAccessibility extends React.Component {
|
||||||
<p> Current line
|
<p> Current line
|
||||||
<span className="editor-linenumber" aria-live="polite" aria-atomic="true" id="current-line"> {this.props.lineNo} </span>
|
<span className="editor-linenumber" aria-live="polite" aria-atomic="true" id="current-line"> {this.props.lineNo} </span>
|
||||||
</p>
|
</p>
|
||||||
|
<div id="canvas-sub">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,8 @@ const hijackConsoleScript = `<script>
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
</script>`;
|
</script>
|
||||||
|
<div id="canvas-sub"> </div>`;
|
||||||
|
|
||||||
class PreviewFrame extends React.Component {
|
class PreviewFrame extends React.Component {
|
||||||
|
|
||||||
|
@ -131,8 +132,10 @@ class PreviewFrame extends React.Component {
|
||||||
const headRegex = new RegExp('head', 'i');
|
const headRegex = new RegExp('head', 'i');
|
||||||
let htmlHeadContents = htmlHead[0].split(headRegex)[1];
|
let htmlHeadContents = htmlHead[0].split(headRegex)[1];
|
||||||
htmlHeadContents = htmlHeadContents.slice(1, htmlHeadContents.length - 2);
|
htmlHeadContents = htmlHeadContents.slice(1, htmlHeadContents.length - 2);
|
||||||
|
htmlHeadContents += '<script src="/data.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>`;
|
||||||
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>`);
|
||||||
|
|
||||||
// const htmlHead = htmlFile.match(/(?:<head.*?>)([\s\S]*?)(?:<\/head>)/gmi);
|
// const htmlHead = htmlFile.match(/(?:<head.*?>)([\s\S]*?)(?:<\/head>)/gmi);
|
||||||
|
|
18777
static/data.js
Normal file
18777
static/data.js
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue