File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import {
1919 setLinewrap ,
2020 setPreferencesTab
2121} from '../../actions/preferences' ;
22- import { p5SoundURL , useP5Version } from '../../hooks/useP5Version' ;
22+ import { p5SoundURL , p5URL , useP5Version } from '../../hooks/useP5Version' ;
2323import VersionPicker from '../VersionPicker' ;
2424import { updateFileContent } from '../../actions/files' ;
2525import { CmControllerContext } from '../../pages/IDEView' ;
@@ -521,8 +521,8 @@ export default function Preferences() {
521521 < TextArea
522522 className = "preference__textarea"
523523 src = {
524- ' <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.7.0/p5.js "></script>\n' +
525- ' <script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.7.0/addons/p5.sound.min.js "></script>'
524+ ` <script src="${ p5URL } "></script>\n` +
525+ ` <script src="${ p5SoundURL } "></script>`
526526 }
527527 />
528528 </ div >
Original file line number Diff line number Diff line change @@ -138,6 +138,7 @@ export const currentP5Version = p5Versions[0];
138138export const p5SoundURL = `https://cdnjs.cloudflare.com/ajax/libs/p5.js/${ currentP5Version } /addons/p5.sound.min.js` ;
139139export const p5PreloadAddonURL = 'https://TODO/preload.js' ;
140140export const p5ShapesAddonURL = 'https://TODO/shapes.js' ;
141+ export const p5URL = `https://cdnjs.cloudflare.com/ajax/libs/p5.js/${ currentP5Version } /p5.js` ;
141142
142143const P5VersionContext = React . createContext ( { } ) ;
143144
You can’t perform that action at this time.
0 commit comments