Permalink
Browse files

Dont mind the query data after the extension

When using Symfony2 with assetic this might be very helpful
  • Loading branch information...
1 parent ad6e8bb commit 130c77ac0a50f3a5dd98968fe7092982c58b6458 @jverdeyen jverdeyen committed Jun 3, 2013
Showing with 8 additions and 2 deletions.
  1. +8 −2 svgeezy.js
View
@@ -44,7 +44,13 @@ var svgeezy = function() {
},
getFileExt: function(src) {
- return src.split('.').pop();
+ var ext = src.split('.').pop();
+
+ if(ext.indexOf("?") !== -1) {
+ ext = ext.split('?')[0];
+ }
+
+ return ext;
},
hasClass: function(element, cls) {
@@ -56,4 +62,4 @@ var svgeezy = function() {
}
};
- }();
+ }();

0 comments on commit 130c77a

Please sign in to comment.