Commit a3c691f8150416a235b909847b05c47ea64c0bb0
- Diff rendering mode:
- inline
- side by side
swtr/static/js/swtmaker.js
(2 / 2)
  | |||
295 | 295 | setImage: function(event) { | |
296 | 296 | event.preventDefault(); | |
297 | 297 | var url = $('#img-url-input').val(); | |
298 | if(url.contains('.jpg') || url.contains('.png') || | ||
299 | url.contains('.gif') || url.contains('.jpeg')) { | ||
298 | if(url.match(/.jpg|.jpeg|.png|.gif|.bmp|.svg/)) { | ||
299 | |||
300 | 300 | this.imgURL = $('#img-url-input').val(); | |
301 | 301 | if(!this.imgURL) { | |
302 | 302 | return false; |