aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2018-05-03 15:45:31 +0200
committerHakim El Hattab <hakim.elhattab@gmail.com>2018-05-03 15:45:31 +0200
commit667c83f1b7db63fcffce0ad611835eb1ac5e3965 (patch)
treebaefd3de3101d7dd4c1a72cd71a22b21a06257ef /js
parent0bbcc6b59439c0b596910004985b0f11ea8a3b80 (diff)
downloadperl-software-in-gnu-guix-667c83f1b7db63fcffce0ad611835eb1ac5e3965.tar
perl-software-in-gnu-guix-667c83f1b7db63fcffce0ad611835eb1ac5e3965.tar.gz
refactor code to match new background dom structure
Diffstat (limited to 'js')
-rw-r--r--js/reveal.js17
1 files changed, 11 insertions, 6 deletions
diff --git a/js/reveal.js b/js/reveal.js
index 7ca6877..163bc99 100644
--- a/js/reveal.js
+++ b/js/reveal.js
@@ -3237,13 +3237,18 @@
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