Commit a3c691f8150416a235b909847b05c47ea64c0bb0
Fix incompatible method in chrome for URL
Incompatible method .contains was used to check if a URL string has image
extensions. This was causing the app to fail in chrome. Fix using merge.
| | | | 295 | setImage: function(event) { | 295 | setImage: function(event) { |
---|
296 | event.preventDefault(); | 296 | event.preventDefault(); |
---|
297 | var url = $('#img-url-input').val(); | 297 | var url = $('#img-url-input').val(); |
---|
298 | if(url.contains('.jpg') || url.contains('.png') || | | if(url.contains('.jpg') || url.contains('.png') || |
---|
299 | url.contains('.gif') || url.contains('.jpeg')) { | | url.contains('.gif') || url.contains('.jpeg')) { |
---|
| | 298 | if(url.match(/.jpg|.jpeg|.png|.gif|.bmp|.svg/)) { | | | 299 | |
---|
300 | this.imgURL = $('#img-url-input').val(); | 300 | this.imgURL = $('#img-url-input').val(); |
---|
301 | if(!this.imgURL) { | 301 | if(!this.imgURL) { |
---|
302 | return false; | 302 | return false; |
---|