refactor code to match new background dom structure
This commit is contained in:
parent
0bbcc6b594
commit
667c83f1b7
1 changed files with 11 additions and 6 deletions
17
js/reveal.js
17
js/reveal.js
|
@ -3237,13 +3237,18 @@
|
||||||
|
|
||||||
startEmbeddedContent( currentBackground );
|
startEmbeddedContent( currentBackground );
|
||||||
|
|
||||||
var backgroundImageURL = currentBackground.style.backgroundImage || '';
|
var currentBackgroundContent = currentBackground.querySelector( '.slide-background-content' );
|
||||||
|
if( currentBackgroundContent ) {
|
||||||
|
|
||||||
|
var backgroundImageURL = currentBackgroundContent.style.backgroundImage || '';
|
||||||
|
|
||||||
|
// Restart GIFs (doesn't work in Firefox)
|
||||||
|
if( /\.gif/i.test( backgroundImageURL ) ) {
|
||||||
|
currentBackgroundContent.style.backgroundImage = '';
|
||||||
|
window.getComputedStyle( currentBackgroundContent ).opacity;
|
||||||
|
currentBackgroundContent.style.backgroundImage = backgroundImageURL;
|
||||||
|
}
|
||||||
|
|
||||||
// Restart GIFs (doesn't work in Firefox)
|
|
||||||
if( /\.gif/i.test( backgroundImageURL ) ) {
|
|
||||||
currentBackground.style.backgroundImage = '';
|
|
||||||
window.getComputedStyle( currentBackground ).opacity;
|
|
||||||
currentBackground.style.backgroundImage = backgroundImageURL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't transition between identical backgrounds. This
|
// Don't transition between identical backgrounds. This
|
||||||
|
|
Loading…
Reference in a new issue