Skip to content

Commit

Permalink
made data-background attribute work with .webp hakimel#3200
Browse files Browse the repository at this point in the history
  • Loading branch information
hakimel committed Apr 25, 2022
1 parent 9415ad5 commit 286d5ef
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/reveal.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/reveal.esm.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/reveal.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/reveal.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/controllers/backgrounds.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export default class Backgrounds {

if( data.background ) {
// Auto-wrap image urls in url(...)
if( /^(http|file|\/\/)/gi.test( data.background ) || /\.(svg|png|jpg|jpeg|gif|bmp)([?#\s]|$)/gi.test( data.background ) ) {
if( /^(http|file|\/\/)/gi.test( data.background ) || /\.(svg|png|jpg|jpeg|gif|bmp|webp)([?#\s]|$)/gi.test( data.background ) ) {
slide.setAttribute( 'data-background-image', data.background );
}
else {
Expand Down

0 comments on commit 286d5ef

Please sign in to comment.