Эх сурвалжийг харах

Allow background images without protocols to have query hashes/parameters.

Closes #1603.
Benjamin Tan 8 жил өмнө
parent
commit
441a26cf90
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      js/reveal.js

+ 1 - 1
js/reveal.js

@@ -859,7 +859,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 ) ) {
+			if( /^(http|file|\/\/)/gi.test( data.background ) || /\.(svg|png|jpg|jpeg|gif|bmp)([?#]|$)/gi.test( data.background ) ) {
 				slide.setAttribute( 'data-background-image', data.background );
 			}
 			else {