Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
e1c94888
Commit
e1c94888
authored
Nov 05, 2013
by
David Baumgold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
If the YouTube API JS fails to load, the rest of the JS should still run
Fixes BLD-472
parent
0d1dc8e2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
cms/templates/base.html
+9
-4
common/static/js/src/youtube_fallback.js
+1
-0
No files found.
cms/templates/base.html
View file @
e1c94888
...
...
@@ -80,10 +80,15 @@
// externally hosted files
"tender"
:
"//edxedge.tenderapp.com/tender_widget"
,
"mathjax"
:
"//edx-static.s3.amazonaws.com/mathjax-MathJax-727332c/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured"
,
// youtube URL does not end in ".js". We add "?noext" to the path so
// that require.js adds the ".js" to the query component of the URL,
// and leaves the path component intact.
"youtube"
:
"//www.youtube.com/player_api?noext"
"youtube"
:
[
// youtube URL does not end in ".js". We add "?noext" to the path so
// that require.js adds the ".js" to the query component of the URL,
// and leaves the path component intact.
"//www.youtube.com/player_api?noext"
,
// if youtube fails to load, fallback on a local file
// so that require doesn't fall over
"js/src/youtube_fallback"
]
},
shim
:
{
"gettext"
:
{
...
...
common/static/js/src/youtube_fallback.js
0 → 100644
View file @
e1c94888
console
.
error
(
"Can't load YouTube -- anything that relies on it will fail"
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment