Skip to content

Commit

Permalink
Closes #1. Fixed a bug in the naming scheme for JavaScript files with…
Browse files Browse the repository at this point in the history
… a version number in the query string, e.g. "jquery.js?version=12345" - they now correctly reduce to "jquery".
  • Loading branch information
berklee committed Apr 7, 2011
1 parent 4ed08b9 commit e5a3860
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.textile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
h1. NBL.js 2.0 - a tiny non-blocking JavaScript lazy loader

*GZipped*: 585 bytes
*Minified*: 946 bytes
*Single line*: 796 bytes
*Minified*: 950 bytes
*Single line*: 800 bytes
*Compatibility*: Tested in Safari, Chrome, Firefox, IE6+, basically doing nothing too fancy.
*Examples*: "http://berklee.github.com/nbl/example.html":http://berklee.github.com/nbl/example.html

Expand Down
2 changes: 1 addition & 1 deletion nbl.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ this.nbl = {
}
},
a: function(u,l) {
var s, m = this, n = u[0].replace(/.+\/|\.min\.js|\.js$|\W/g, ''); // Clean up the name of the script for storage in the queue
var s, m = this, n = u[0].replace(/.+\/|\.min\.js|\.js|\?.+|\W/g, ''); // Clean up the name of the script for storage in the queue
s = m.q[n] = m.c.createElement("script");
s.setAttribute("src", u[0]);
// When this script completes loading, it will trigger a callback function consisting of two things:
Expand Down
2 changes: 1 addition & 1 deletion nbl.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion nbl.plus.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ this.nbl = {
}
},
a: function(u,l) {
var s, t, m = this, n = u[0].replace(/.+\/|\.min\.js|\.js$|\W/gi, ''), k = {js: {t: "script", a: "src"}, css: {t: "link", a: "href", r: "stylesheet"}, "i": {t: "img", a: "src"}}; // Clean up the name of the script for storage in the queue
var s, t, m = this, n = u[0].replace(/.+\/|\.min\.js|\.js|\?.+|\W/g, ''), k = {js: {t: "script", a: "src"}, css: {t: "link", a: "href", r: "stylesheet"}, "i": {t: "img", a: "src"}}; // Clean up the name of the script for storage in the queue
t = u[0].match(/\.([cjs]{2,4})$/i); t = (t) ? t[1] : "i";
s = m.q[n] = m.c.createElement(k[t].t);
s.setAttribute(k[t].a, u[0]);
Expand Down
2 changes: 1 addition & 1 deletion nbl.plus.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion nbl.single.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions readme.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ <h2 class="sub">(a tiny non-blocking JavaScript lazy loader)</h2>
<div class="pullout">
<ul>
<li><strong>GZipped</strong>: 585 bytes</li>
<li><strong>Minified</strong>: 946 bytes</li>
<li><strong>Single line</strong>: 796 bytes</li>
<li><strong>Minified</strong>: 950 bytes</li>
<li><strong>Single line</strong>: 800 bytes</li>
</ul>
</div>

Expand Down

0 comments on commit e5a3860

Please sign in to comment.