Skip to content

Instantly share code, notes, and snippets.

@tnadav
Created June 1, 2010 12:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tnadav/420899 to your computer and use it in GitHub Desktop.
Save tnadav/420899 to your computer and use it in GitHub Desktop.
jQuery.require.urlFilter = function(url) {
if ( !/\./.test(url) || (/^([\w\d$]+)./.test(url) && !/\//.test( url ) && !/.js$/.test( url )) ) {
url = url.replace(/\./g, "/").replace(/^([\w\d$]+)./, function(all, name) {
return (requireNamespaces[name] || name) + "/";
}) + ".js";
}
return url;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment