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 {
19
19
setLinewrap ,
20
20
setPreferencesTab
21
21
} from '../../actions/preferences' ;
22
- import { p5SoundURL , useP5Version } from '../../hooks/useP5Version' ;
22
+ import { p5SoundURL , p5URL , useP5Version } from '../../hooks/useP5Version' ;
23
23
import VersionPicker from '../VersionPicker' ;
24
24
import { updateFileContent } from '../../actions/files' ;
25
25
import { CmControllerContext } from '../../pages/IDEView' ;
@@ -521,8 +521,8 @@ export default function Preferences() {
521
521
< TextArea
522
522
className = "preference__textarea"
523
523
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>`
526
526
}
527
527
/>
528
528
</ div >
Original file line number Diff line number Diff line change @@ -138,6 +138,7 @@ export const currentP5Version = p5Versions[0];
138
138
export const p5SoundURL = `https://cdnjs.cloudflare.com/ajax/libs/p5.js/${ currentP5Version } /addons/p5.sound.min.js` ;
139
139
export const p5PreloadAddonURL = 'https://TODO/preload.js' ;
140
140
export const p5ShapesAddonURL = 'https://TODO/shapes.js' ;
141
+ export const p5URL = `https://cdnjs.cloudflare.com/ajax/libs/p5.js/${ currentP5Version } /p5.js` ;
141
142
142
143
const P5VersionContext = React . createContext ( { } ) ;
143
144
You can’t perform that action at this time.
0 commit comments