Skip to content

Instantly share code, notes, and snippets.

@tnadav tnadav/gist:420899
Created Jun 1, 2010

Embed
What would you like to do?
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
You can’t perform that action at this time.