aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2014-04-28 09:58:13 +0200
committerHakim El Hattab <hakim.elhattab@gmail.com>2014-04-28 09:58:13 +0200
commitfcec8d058d981593b1d237d7760f42354ee7684a (patch)
treec9988d49f506b3b323b3368dc3e11a33d6d398d0 /js
parentfa2413ec73b72fea831b64ac983d3006fae59fcd (diff)
downloadfosdem-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.js4
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 ) {