File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -534,16 +534,16 @@ angular.module('textAngularSetup', [])
534
534
tooltiptext : taTranslations . insertVideo . tooltip ,
535
535
action : function ( ) {
536
536
var urlPrompt ;
537
- urlPrompt = $window . prompt ( taTranslations . insertVideo . dialogPrompt , 'http ://' ) ;
538
- if ( urlPrompt && urlPrompt !== '' && urlPrompt !== 'http ://' ) {
537
+ urlPrompt = $window . prompt ( taTranslations . insertVideo . dialogPrompt , 'https ://' ) ;
538
+ if ( urlPrompt && urlPrompt !== '' && urlPrompt !== 'https ://' ) {
539
539
// get the video ID
540
540
var ids = urlPrompt . match ( / ( \? | & ) v = [ ^ & ] * / ) ;
541
541
/* istanbul ignore else: if it's invalid don't worry - though probably should show some kind of error message */
542
542
if ( ids . length > 0 ) {
543
543
// create the embed link
544
- var urlLink = "http ://www.youtube.com/embed/" + ids [ 0 ] . substring ( 3 ) ;
544
+ var urlLink = "https ://www.youtube.com/embed/" + ids [ 0 ] . substring ( 3 ) ;
545
545
// create the HTML
546
- var embed = '<img class="ta-insert-video" src="http ://img.youtube.com/vi/' + ids [ 0 ] . substring ( 3 ) + '/maxresdefault.jpg" ta-insert-video="' + urlLink + '" contenteditable="false" src="" allowfullscreen="true" frameborder="0" />' ;
546
+ var embed = '<img class="ta-insert-video" src="https ://img.youtube.com/vi/' + ids [ 0 ] . substring ( 3 ) + '/maxresdefault.jpg" ta-insert-video="' + urlLink + '" contenteditable="false" src="" allowfullscreen="true" frameborder="0" />' ;
547
547
// insert
548
548
return this . $editor ( ) . wrapSelection ( 'insertHTML' , embed , true ) ;
549
549
}
You can’t perform that action at this time.
0 commit comments