code: function getExtension(url) {
      var a = url.split('.');
  
      if (a.length === 1 || (a[0] === '' && a.length === 2))
        return '';
      return a.pop();
    }
docs: Retrieve a file extenstion from filename or url