Permalink
Browse files

Small fix for if audio.js is loaded with a query string like '?130147…

…8336'.
  • Loading branch information...
1 parent a63ee95 commit 54fa1e6fb76caf08b8ef6f00868d72b91c95d6a2 @gunn gunn committed with Mar 30, 2011
Showing with 6 additions and 5 deletions.
  1. +2 −1 audiojs/audio.js
  2. +4 −4 audiojs/audio.min.js
View
@@ -1,8 +1,9 @@
// A cross-browser javascript shim for html5 audio
(function(audiojs, audiojsInstance, container) {
// Use the path to the audio.js file to create relative paths to the swf and player graphics
+ // Remember that some systems (e.g. ruby on rails) append strings like '?1301478336' to asset paths
var path = (function() {
- var re = new RegExp('audio(\.min)?\.js'),
+ var re = new RegExp('audio(\.min)?\.js.*'),
scripts = document.getElementsByTagName('script');
for (var i = 0, ii = scripts.length; i < ii; i++) {
var path = scripts[i].getAttribute('src');
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 54fa1e6

Please sign in to comment.