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
464141c7
Commit
464141c7
authored
Aug 09, 2013
by
Giulio Gratta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changing http:// to // on intro video urls to prevent browsers from blocking video embeds
parent
6b16ef0a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
cms/djangoapps/models/settings/course_details.py
+1
-1
cms/static/js/models/settings/course_details.js
+1
-1
lms/templates/index.html
+1
-1
No files found.
cms/djangoapps/models/settings/course_details.py
View file @
464141c7
...
...
@@ -173,7 +173,7 @@ class CourseDetails(object):
# the right thing
result
=
None
if
video_key
:
result
=
'<iframe width="560" height="315" src="
http:
//www.youtube.com/embed/'
+
\
result
=
'<iframe width="560" height="315" src="//www.youtube.com/embed/'
+
\
video_key
+
'?autoplay=1&rel=0" frameborder="0" allowfullscreen=""></iframe>'
return
result
...
...
cms/static/js/models/settings/course_details.js
View file @
464141c7
...
...
@@ -75,7 +75,7 @@ CMS.Models.Settings.CourseDetails = Backbone.Model.extend({
return
this
.
videosourceSample
();
},
videosourceSample
:
function
()
{
if
(
this
.
has
(
'intro_video'
))
return
"
http:
//www.youtube.com/embed/"
+
this
.
get
(
'intro_video'
);
if
(
this
.
has
(
'intro_video'
))
return
"//www.youtube.com/embed/"
+
this
.
get
(
'intro_video'
);
else
return
""
;
}
});
lms/templates/index.html
View file @
464141c7
...
...
@@ -186,7 +186,7 @@
else:
youtube_video_id =
"XNaiOGxWeto"
%
>
<iframe
width=
"640"
height=
"360"
src=
"
http:
//www.youtube.com/embed/${youtube_video_id}?showinfo=0"
frameborder=
"0"
allowfullscreen
></iframe>
<iframe
width=
"640"
height=
"360"
src=
"//www.youtube.com/embed/${youtube_video_id}?showinfo=0"
frameborder=
"0"
allowfullscreen
></iframe>
</div>
</section>
...
...
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