diff options
author | Hakim El Hattab <hakim.elhattab@gmail.com> | 2014-04-28 09:58:13 +0200 |
---|---|---|
committer | Hakim El Hattab <hakim.elhattab@gmail.com> | 2014-04-28 09:58:13 +0200 |
commit | fcec8d058d981593b1d237d7760f42354ee7684a (patch) | |
tree | c9988d49f506b3b323b3368dc3e11a33d6d398d0 /js | |
parent | fa2413ec73b72fea831b64ac983d3006fae59fcd (diff) | |
download | fosdem-2018-presentation-fcec8d058d981593b1d237d7760f42354ee7684a.tar fosdem-2018-presentation-fcec8d058d981593b1d237d7760f42354ee7684a.tar.gz |
fix lazy loading bug related to data-background-image attribute
Diffstat (limited to 'js')
-rw-r--r-- | js/reveal.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/js/reveal.js b/js/reveal.js index d3ca1fe..c6187ec 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -613,7 +613,7 @@ if( data.background ) { // Auto-wrap image urls in url(...) if( /^(http|file|\/\/)/gi.test( data.background ) || /\.(svg|png|jpg|jpeg|gif|bmp)$/gi.test( data.background ) ) { - slide.setAttribute( 'data-background-image', 'url('+ data.background +')' ); + slide.setAttribute( 'data-background-image', data.background ); } else { element.style.background = data.background; @@ -2336,7 +2336,7 @@ // Images if( backgroundImage ) { - background.style.backgroundImage = backgroundImage; + background.style.backgroundImage = 'url('+ backgroundImage +')'; } // Videos else if ( backgroundVideo ) { |