From e51c0fc3ce3568eb325b87fe60ca7bdd07861150 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Thu, 20 Jun 2013 16:46:26 -0400 Subject: broader image url detect (closes #500) --- js/reveal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/reveal.js') diff --git a/js/reveal.js b/js/reveal.js index e240a76..e95ec74 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -283,7 +283,7 @@ var Reveal = (function(){ if( data.background ) { // Auto-wrap image urls in url(...) - if( /^(http|file|\/\/)/gi.test( data.background ) ) { + if( /^(http|file|\/\/)/gi.test( data.background ) || /\.(png|jpg|jpeg|gif|bmp)$/gi.test( data.background ) ) { element.style.backgroundImage = 'url('+ data.background +')'; } else { -- cgit v1.2.3