fix append to existing embed query
This commit is contained in:
parent
a7a32f941c
commit
2e0fe815a6
1 changed files with 2 additions and 2 deletions
|
@ -2553,7 +2553,7 @@
|
||||||
toArray( dom.slides.querySelectorAll( 'iframe[src*="youtube.com/embed/"]' ) ).forEach( function( el ) {
|
toArray( dom.slides.querySelectorAll( 'iframe[src*="youtube.com/embed/"]' ) ).forEach( function( el ) {
|
||||||
var src = el.getAttribute( 'src' );
|
var src = el.getAttribute( 'src' );
|
||||||
if( !/enablejsapi\=1/gi.test( src ) ) {
|
if( !/enablejsapi\=1/gi.test( src ) ) {
|
||||||
el.setAttribute( 'src', src + ( !/\?/.test( src ) ? '?' : '' ) + 'enablejsapi=1' );
|
el.setAttribute( 'src', src + ( !/\?/.test( src ) ? '?' : '&' ) + 'enablejsapi=1' );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -2561,7 +2561,7 @@
|
||||||
toArray( dom.slides.querySelectorAll( 'iframe[src*="player.vimeo.com/"]' ) ).forEach( function( el ) {
|
toArray( dom.slides.querySelectorAll( 'iframe[src*="player.vimeo.com/"]' ) ).forEach( function( el ) {
|
||||||
var src = el.getAttribute( 'src' );
|
var src = el.getAttribute( 'src' );
|
||||||
if( !/api\=1/gi.test( src ) ) {
|
if( !/api\=1/gi.test( src ) ) {
|
||||||
el.setAttribute( 'src', src + ( !/\?/.test( src ) ? '?' : '' ) + 'api=1' );
|
el.setAttribute( 'src', src + ( !/\?/.test( src ) ? '?' : '&' ) + 'api=1' );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue